Course summary: Work with macros

Macros aren’t available in Office on a Windows RT PC

To see what version of Office 2013 you’re running, click File >Account. Look for Microsoft Office 2013 RT under Product Information.

First, show the Developer tab

The Developer tab, on the ribbon, is where all of the macro commands are. To have it appear on the ribbon, click File > Options > Customize Ribbon, check Developer, and click OK. On the Developer tab, in the Code group, are the Record Macro button and some other buttons that will come in handy.

Create a macro using Visual Basic

  1. Click Developer > Visual Basic.
  2. If needed, in the Visual Basic Editor, on the Insert menu, click Module.

     Note    Modules are automatically created for all sheets in the workbook.

  1. In the code window of the module, type or copy the macro code that you want to use.
  2. To run the macro from the module window, press F5.
  3. In the Visual Basic Editor, on the File menu, click Close and Return to Microsoft Excel when you finish writing the macro.

Edit the macro

  1. On the Developer tab, in the Code group, click Macros.
  2. In the Macro name box, click the macro that you want to edit.
  3. Click Edit. The Visual Basic Editor appears.

See also

Applies to:
Excel 2013