Please note javascript is required for full website functionality.

Blog

VBA Blogs: Introduction to VBA: Recording Macros

20 January 2017

Every Friday, we intend to post a blog talking about VBA and highlight the benefits, the pitfalls, and cover a range of basic concepts that everyone who uses VBA should know. Today, we want to talk about recording macros.

The simplest way to start creating macros is to use the Record feature in Excel. You can find this by going to the View tab, find the Macros sub-menu on the right hand side, and choosing the “Record Macro” option. Choose a name, and if you want the macro to run every time you press a keyboard shortcut, you can specify that as well.

Now, anything that you do in Excel will be stored as VBA code and can be repeated whenever you run the macro.  Try to do any (or all!) of the following: 

  • Select different cells
  • Select different worksheets
  • Insert columns or rows
  • Type a formula into a cell
  • Create a chart

Now, every time you use the keyboard shortcut that you specified, or go to “View Macros” and run your new macro, those same actions will be repeated.  Simple!  Stay tuned for next week’s update in the series!

Newsletter