Past Meetup

Excel: writing Macros VBA to automate routine tasks

This Meetup is past

9 people went


Writing Excel Macros in VBA may seem intimidating, but I can show you a few things to get you started. I will also share some VBA coding I reuse often. I didn't take any formal classes, but I learned through problem solving, Googling for solutions and trial and error. I wish I had a mentor when I was just starting out. I hope I can give you some pointers to get you started.

This program is NOT sponsored by the El Segundo Public Library.

Why write Excel macros in VBA?

From the Microsoft web site:

By far the most common reason to use VBA in Excel is to automate repetitive tasks. For example, suppose that you have a few dozen workbooks, each of which has a few dozen worksheets, and each of those needs to have some changes made to it. The changes could be as simple as applying new formatting to some fixed range of cells or as complex as looking at some statistical characteristics of the data on each sheet, choosing the best type of chart to display data with those characteristics, and then creating and formatting the chart accordingly.

Either way, you would probably rather not have to perform those tasks manually, at least not more than a few times. Instead, you could automate the tasks by using VBA to write explicit instructions for Excel to follow.

VBA is not just for repetitive tasks though. You can also use VBA to build new capabilities into Excel (for example, you could develop new algorithms to analyze your data, then use the charting capabilities in Excel to display the results).