skip to: page content | skip to: freshman/sophomore campuses listings | navigation | UW Colleges & site information
Get all the latest Computing Tips from our RSS feedrss icon

Macros in Microsoft Word & Excel

A Macro is a named set of actions that tells any Office 2003 application to perform a series of actions. For most Word and Excel users there are actions that are repeated over and over again, which could easily be replaced by a macro. MS Word comes with many macros that are already created. In most cases however, the user will want to create their own macro to meet their specific needs. Today's "Tip" will show users how to create macros in Word and in Excel.

Word Macros

The example I am going to use in Word is creation of a macro that will add a footer to the document. The footer will include the date and my name. Begin by clicking on Tools>Macro>Record New Macro. This will open the Record Macro dialogue box.

Image of Record Macro Dialog Box

  1. Name the Macro
  2. Click on the Keyboard button. This is where the macro keystrokes will be set.

Image of Customize Keyboard Dialogue Box

Try different keystroke combinations until Currently assigned to: says "[unassigned]". In this case Alt+F is currently unassigned, so I will use that for my macro that will automatically create a footer on all my Word documents. Finally to Assign the keystrokes to this macro named Footer, I will click on the Assign button. Next click on Close. This will bring up a recording button.

To assign the steps to the macro I will go through the steps necessary to create a footer with my name and the current date. Once that is complete I click on the blue button to stop recording.

This video will show all the steps involved in creating the macro and then running the macro in MS Word. Creating a Footer using a Macro.

Excel Macros

Macros in Excel are created in basically the same way as they are in MS Word. After clicking on Tools>Macro>Record New Macro the Record Macro dialog box will open.

Image of Record Macro dialogue box in Excel

Once again the steps are similar.

  1. Name the Macro
  2. Find a Shortcut Key. Excel will suggest an available shortcut if the one the user selects is already in use (this is different in Word)
  3. Users should store the macro in their Personal Macro Workbook. This gives the user access to the macro while working in any workbook.
  4. Click on OK
  5. Once the user clicks on OK recording begins and the user can work through the steps for the macro. Once recording of the macro is complete, click Tools>Macro>Stop Recording.

Be sure to test the macro to make sure it works. Open a new worksheet and go through the keystrokes for the macro. The events recorded in the macro should run correctly.

This video will show all the steps involved in creating the macro and then running the macro in MS Excel. Creating a Macro using MS Excel.

Questions about macros, remember there is lots of information at Microsoft Office Online.


skip to: page content | skip to: freshman/sophomore campuses listings | navigation | UW Colleges & site information