Reeeeeallly basic text on programming

I’m a 54 yr old registered nurse. I use Excel at work every day. Everything I know about computers I learned on the job. I’m also a “Liberal Arts” type. I grew up before hand held calculators. I never really learned how to use a slide rule. I would like to learn to program some very simple routines, like Excel macros. I have been searching but every text or tutorial I have seen assumes a degree of programming knowledge that seems to be beyond my grasp. I’m usually lost after a few lines.

Does anybody out there in C&F Land know a source for basic, old fart, start from the beginning lessons on programming?

Mike

I think Office macros are done in Visual Basic - M*crosoft’s proprietory Basic language. Probably best to search out beginner Visual Basic tutorials rather than Excel macro tutorials. I think you’ll also need to collect a few tools for programming in VB, such as a development environment and runtime stuff.

If you want to get a basic handle on the simplest principles of programming (principles which will be easily adaptable when you move on to something like Visual Basic) then why not start with JavaScript? It’s an old scripting language for which there are countless free tutes on the Web. What’s best about it is that you don’t need anything more than an editor and Internet Explorer (or your browser of choice) to write it and run it.

If you want a good FREE HTML/JavaScript editor then I recommend Evrsoft’s ‘1st Page 2000’ which you can download from:
http://www.evrsoft.com/1stpage2.shtml

JavaScript is a simple way to see how you get on with the fundamentals of programming/scripting.

Good luck.

Yep, that and recording key strokes…

There is a “Visual Basic for Dummies” book.
They are usually good for deciding if you really want to learn more.

Yeh, they’re not bad… but the style can be a bit grating - sometimes they think we’re dumber than we are (even me!). Another good range of beginner’s books is the SAMS ‘Teach Yourself in 24 Hours’

Agreed…but if you know nothing they’re great.
:slight_smile:

What are you trying to do? Maybe there’s a better way.

The first thing was this: Each month I get reports, in text format, that I need to turn into an Excel worksheet. The text file includes three columns with date/time values. In the text files they are, for example,
“11/01/05 1534” I need to change the “1534” into “15:34” so Excel can subtract one date/time from another, ending up with the elapsed time. It’s a real nuisance to add colons to three columns of fifty or sixty rows of data. I tried recording a macro but I can’t get it to record with relative references. That’s just one example. There are other repetetive tasks that I would like to automate. Excel help says to just go into the VBA code and edit it, which is what I need to learn how to do. It’s like, if you don’t know how to do it you can’t learn how to do it because you don’t know how to do it.

Buddhu and Denny, thanks for the suggestions. I have read the Dummies books for Excel and Access. After a few pages I got really frustrated with their juvenile writing style. But I think I’ll take a look at the VBA book.

Thanks again!
Mike

Hey Mike,

I make my living writing VBA code for Office products. I’ll PM with some suggestions. I’ve got something I have to do this morning but afterward I’ll work on the idea and see what I come up with.

The “…for Dummies” books are written that way on purpose.

VBA and VB are similar but there are significant differences. I’d definitely use a VBA book. What version of Office are you using? There are some good books on programming for Office 200X.

Beware, Office 2000 and 2003 have some major compatibility issues in the macro and programming end.

Use the =MID Function to take out the 15 by itself and concatenate the ‘:’ and then add the 34.

In the example below, your assuming that your data “11/01/05 1534” is in A1.

=CONCATENATE(MID(A1,10,2),":",MID(A1,12,2))



[/code]

Except you have to have the Concatanate function in a different cell then the one you wish to modify AND the results remove the date and leave only the time.

That does bring up a good point, I misunderstood. The date and time are both in one cell?

I’ve written a really cool little macro that will work like a charm.

what FlyDood said…and…

If you have “11/01/05 1534” that’s one thing but,
“5/01/05 1534” instead of “05/01/05 1534” will throw ya,
for nine months if the year…

Fly,
I’m using Office 2003.

I appreciate the solutions that are being posted, and I don’t want to seem ungrateful, but what I was aiming at here is “learning how to fish” as opposed to “being given a fish”. That’s why I feel I need to attain basic literacy in programming.

In the short term, however, It seems to me that the concatenate function would not work for some reason. I have never heard of =MID function. I’ll have to look it up.

I continue to have the feeling that I am lacking some magic key, perhaps one word that, once found, will light my way to the programming confraternity. Or not.
Mike

concatenate & substrings are in all of the various languages…
…ya gotta be able to fish things out of strings…
The syntax and verbs vary but the functionality must be there.

A good programmer steals something that works and tweaks it as necessary, a really good routine just works.

If you are trying to learn a tune it is good to hear someone play it that knows how.
Study someone fishing. Study the routine…learn the verbs and how to use them.

You don’t need a seperate development environment. Excel (and other MS Office products) contain a VB Script editor for developing macros. VB Script is quite similar to JavaScript so the skills you learn with one can easily be transferred to another.

Here’s a short intro to macros in excel:
http://office.microsoft.com/en-us/assistance/HA011189581033.aspx

VB Script reference site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtorivbscript.asp

Some excellent free articles about macros and VBA in Excel:
http://spreadsheets.about.com/od/excelmacrosandvba/

Nice links.

VBScript and VBA are different animals.

There are two code editors available in Office. The Visual Basic editor and the Microsoft Script editor. Both are found in the Tools | Macros menu. The Script editor is basically Micro$ofts brand of XML. Yuck.