• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Part 10. Advanced Excel and Web Features > Automating Repetitive Tasks with Mac...

Automating Repetitive Tasks with Macros

Open the Tools menu, choose Macro, and select Record New Macro to open the Record Macro dialog box.

In the Macro name field, type a descriptive name for the macro and click OK. The Macro toolbar appears with the Stop Recording button visible.

Excel begins recording your actions; anything you do now will be performed by the macro when it is run. In this case, click the New button on the Standard toolbar.

Add and format any text that you want automatically placed in the new workbook that the macro creates.


If your job requires you to use your computer to perform repetitive tasks, chances are you can create macros to automate those tasks. For example, suppose you frequently create quarterly workbooks. In that case, you could create a macro that opens up a new blank workbook for you and adds the appropriate column heading information, as outlined in this task. You can create macros that accomplish just about any task in Excel—without knowing anything about programming. You simply use Excel's macro-recording feature to record the actions of a particular task; then, when you run the macro, Excel performs these actions for you.


Macro security

Sometimes macros can be corrupt, or people intentionally write macros that can wreak havoc on your computer files. Before you run a macro, make sure you know where it's from and that it is a trusted source. To be extra careful, choose Tools, Macro, Security to open the Security dialog box. Make sure the security level is set to High.

When you've completed all the actions that you want the macro to perform, click the Stop Recording button on the Macro toolbar.

To run the macro you created, open the Tools menu, choose Macro, and select Macros (or press Alt+F8) to open the Macro dialog box.

Double-click on the macro's name to run it. (Notice that in this case, the macro's name contains the name of the workbook you were using when the macro was created.)

Excel runs the macro—in this case, automatically creating a new workbook, and adding and formatting the text you specified.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint