Running the Macro

After you create a macro, you can use it to repeat its commands. Excel offers many ways to run a macro. Here are the two most common methods for running a macro:

  • Select Tools, Macro, Macros, Run.

  • Use the macro shortcut key (if you defined one).

The quickest way to run the macro is to use the macro shortcut key. If the macro doesn't have a shortcut key assigned to it, you must use Tools, Macro, Macros, Run.

In the following To Do exercise, you run the macro you just created by using the macro name, Font_change.

To Do: Run the Macro

  1. First select cell A1 in the Summary sheet. This data in this cell needs a font change.

  2. Choose Tools, Macro, Macros. The Macro dialog box appears, as shown in Figure 20.4.

    Figure 20.4. The Macro dialog box.


  3. In the Macro dialog box, select Font_change.

  4. Click Run. Excel runs the Font_change macro by changing the title in the worksheet to a 22-point Arial font.

If you want to run the macro using a shortcut key, just press the shortcut key you assigned to the macro. Before testing the Font_change macro, select cell J16. Then, to run the Font_change macro, press Ctrl+Shift+F. Excel should format the data in cell J16 with the 22-point Arial font. Macros are powerful, aren't they? You'll have to make column J wider to accommodate the long entry in cell J16.


You can stop a macro while it's running by simply pressing the Esc key. Excel stops the macro before it completes its actions.

    Part I: Excel Basics