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

Protecting Fields

Fields are very helpful for inserting dynamic information or standardizing the information that appears in a document. ...

Discover More

Sticking with the Dashes

By default, dashes don't "stick" to the text that follows them. Here's one way around this normal formatting convention.

Discover More

Storing Macros in Templates

How Excel uses templates is different than how Word uses templates. This tip looks at those differences and discusses ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (menu)

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

Hiding Entries in an InputBox

Requiring users to input a password in Excel increases the security of the worksheet and can prevent someone from running ...

Discover More

Trouble Recording Paste Special Formula

Sometimes, when you upgrade to a new version of Excel, you could run into a problem recording macros that you had no ...

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 + 5?

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.