Excel 2003 Macro Tutorial

01
of 06

Excel Macro Recorder Tutorial

This tutorial covers using the macro recorder to create a simple macro in Excel. The tutorial does not cover creating or editing a macro using the VBA editor.

02
of 06

Starting the Excel Macro Recorder

Excel Macro Tutorial
Excel Macro Tutorial. © Ted French

Note: For help on these steps, refer to the image above.

The easiest way to create a macro in Excel is to use the macro recorder.

To do so, click Tools > Macros > Record New Macro from the menus to bring up the Record Macro dialog box.

03
of 06

The Macro Recorder Options

Excel Macro Tutorial
Excel Macro Tutorial. © Ted French

Note: For help on these steps, refer to the image above.

There are four options to complete in this dialog box:

  1. Name – give your macro a descriptive name.
  2. Shortcut key – (optional) fill in a letter in the available space. This will allow you to run the macro by holding down the CTRL key and pressing the chosen letter on the keyboard.
  3. Store macro in –
    • Options:
    • the current workbook
      • The macro is available only in this file.
    • a new workbook
      • This option opens a new Excel file. The macro is available only in this new file.
    • a personal macro workbook.
      • This option creates a hidden file – Personal.xls – which stores your macros and makes them available to you in all Excel files 
  4. Description - (optional) Enter a description of the macro.
04
of 06

Excel Macro Recorder

Excel Macro Tutorial
Excel Macro Tutorial. © Ted French

Note: For help on these steps, refer to the image above.

When finished setting your options in the Macro Recorder dialogue box in the previous step of this tutorial, click the OK button to start the macro recorder.

The Stop Recording toolbar should also appear on screen.

The macro recorder records all keystrokes and clicks of the mouse. Create your macro by:

  • manually going though all the necessary steps.
  • When finished, click the stop button (small blue square) on the Stop Recording toolbar.
  • If the Stop Recording toolbar is not available, click Tools > Macros > Stop Recording from the menus to stop recording.
05
of 06

Running a Macro in Excel

Excel Macro Tutorial
Excel Macro Tutorial. © Ted French

Note: For help on these steps, refer to the image above.

To run a macro you have recorded:

  • If you chose a shortcut key when creating the macro, hold down the CTRL key on the keyboard and press the shortcut key.

Otherwise,

  1. Click Tools > Macros > Macro from the menus to bring up the Macro dialogue box.
  2. Select a macro from the list of those available.
  3. Click the Run button.
06
of 06

Editing a Macro

Excel Macro Tutorial
Excel Macro Tutorial. © Ted French

Note: For help on these steps, refer to the image above.

An Excel macro is written in the Visual Basic for Applications (VBA) programming language.

Clicking on either the Edit or Step Into buttons in the Macro dialogue box starts the VBA editor (see the image above).

Macro Errors

Unless you know VBA, re-recording a macro that does not work right is usually the best option.

Format
mla apa chicago
Your Citation
French, Ted. "Excel 2003 Macro Tutorial." ThoughtCo, Jun. 2, 2017, thoughtco.com/excel-2003-macro-tutorial-3123382. French, Ted. (2017, June 2). Excel 2003 Macro Tutorial. Retrieved from https://www.thoughtco.com/excel-2003-macro-tutorial-3123382 French, Ted. "Excel 2003 Macro Tutorial." ThoughtCo. https://www.thoughtco.com/excel-2003-macro-tutorial-3123382 (accessed January 21, 2018).