O'Reilly logo

Learn Excel 2011 for Mac by Guy Hart-Davis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recording an Example Macro

The previous section described the general steps for recording a macro. This section shows you a step-by-step example of recording a short macro that we'll open and edit in the Visual Basic Editor later in the chapter.

The macro simply copies the active worksheet to an archive workbook so that you have a reference copy of the worksheet. To copy the worksheet, the macro takes five actions:

  • Opens the archive workbook.
  • Activates the previous workbook.
  • Copies the worksheet to the archive workbook.
  • Saves the archive workbook.
  • Closes the archive workbook.

To record the example macro, follow these steps:

  1. Create a workbook named Archive.xlsx, then close it. For example:
    1. Press Cmd+N to create a new blank workbook.
    2. Press ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required