Running the Macro

After you create a macro, you should run it at least once to make sure it works correctly. Later in this chapter you will learn various ways to run macros, but for now, use the menu command.

To see the results of your macro, be sure to remove the formatting from the example worksheet. To do this, press Ctrl+A to select the entire worksheet, and then choose Edit | Clear | Formats. Select cells A1:A3 and choose Edit | Delete. In the Delete dialog box, select the Entire row option button. Then click OK. Later on you can record the steps of clearing the worksheet formats in a separate macro.

1. Open any worksheet containing text, numbers, and formulas.

2. Choose Tools | Macro | Macros to open the Macro dialog box.

3. Click the name of the macro you want to run (see Figure 1-4).

4. Choose Run to execute the macro.

Quite often, you will notice that your macro does not perform as expected the first time you run it. Perhaps during the macro recording you selected the wrong font or forgot to change the cell color or maybe you just realized it would be better to include an additional step. Don't panic. Excel makes it possible to modify the macro without forcing you to go through the tedious process of recording your keystrokes again.

Figure 1-4:

In the Macro dialog box you can select a macro to run, edit, or delete.

Figure 1-4:

In the Macro dialog box you can select a macro to run, edit, or delete.

Was this article helpful?

0 0

Post a comment