Assigning a Macro to a Keyboard Combination

Written by Allen Wyatt (last updated January 29, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


Excel allows you to assign macros to specific key combinations. These key combinations are referred to as shortcut keys, and when used they result in the macro being executed. If you want to assign or change a key combination associated with a macro, you can follow these steps:

  1. Choose the Macro option from the Tools menu, then choose Macros from the resulting submenu. This displays the Macro dialog box. (See Figure 1.)
  2. Figure 1. The Macro dialog box.

  3. From the list of available macros, select the macro whose shortcut key you want to change.
  4. Click on Options. Excel displays the Macro Options dialog box. (See Figure 2.)
  5. Figure 2. The Macro Options dialog box.

  6. In the Shortcut Key area, indicate the key you want used with the Ctrl key as your shortcut. For instance, if you want Ctrl+Y to execute your macro, then enter a Y in the Shortcut Key area.
  7. Click on OK to close the Macro Options dialog box.
  8. Click on Cancel to close the Macro dialog box.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2714) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Heading Changes for Multi-page Tables

When you have a long table that extends over multiple pages, Word allows you to specify one or more rows to be repeated ...

Discover More

Should I Leave My Computer On All the Time?

Do you turn your computer on and off all the time? Do you really know if this is good for your computer or not?

Discover More

Files Opening Slowly If Many Files Exist

Managing large numbers of documents in Word can lead to some interesting challenges. One potential challenge is that your ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (menu)

Official Color Names in VBA

When creating macros, you can use the ColorIndex and Color properties to set or determine the colors in a cell. Excel ...

Discover More

Exiting a For ... Next Loop Early

If you use For ... Next loops in your macros, make sure you give a way to jump out of the loop early. That way you can ...

Discover More

Switching Windows in a Macro

When you have multiple workbooks open at the same time, Excel allows you to easily switch between those workbooks. How ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.