Excel 2010: Assigning Keyboard Shortcuts to Macros and Adding Macro Buttons
Do you find yourself forgetting keyboard shortcuts for your Excel macros? When first recording a macro, you will have an opportunity in the Record Macro dialog box to specify a shortcut key for the macro. However, you may eventually forget the shortcut, or if you didn’t assign a shortcut key when you first recorded the macro, you may now like to assign one – or perhaps you have even decided to change the shortcut key to something different.
To view your macro shortcut keys, on the View tab of the Ribbon, click the Macros button, select your macro, and choose Options…. You will see the Macro Options dialog box:
Here you can view the macro shortcut and description, assign a shortcut, or modify the existing shortcut keys. When revising shortcuts, it doesn’t matter whether you saved the macro in this workbook or in the Personal Macro workbook. Just make sure that you do not use an existing Excel keyboard shortcut (such as CTRL B, which bolds a cell). In addition, use a single letter with the CTRL or Shift keys.
Note: The CTRL + SHIFT + single letter keyboard combination may work best for a macro shortcut due to the many Excel shortcuts which already use the CTRL + single letter combinations.
Adding a Macro Button to the Quick Access Toolbar
Rather than creating a keyboard shortcut, you can add a macro button to the Quick Access Toolbar. (In Microsoft Office 2010, it is possible to add a new group to the Ribbon so you may prefer to add a Macro group that will include all of your macros).
To add a macro to the Quick Access Toolbar:
- Open the Excel Options dialog box and click the Quick Access Toolbar link in the left pane. (If you want to add the macro to the Ribbon, choose Customize Ribbon. You will have the option to add a new group to the Ribbon to which you can add your macros).
- In the “Choose Commands From” drop-down menu, select Macros. Excel macros, including your custom macros, will display.
- Select the macros that you want to add to the Quick Access Toolbar, and click Add >>. Note that there is a <Separator> at the top of the list, which you can add to separate the macros from other commands on the Quick Access Toolbar).
- Then click the Modify… button at the bottom of the right pane if you want to rename the macro or if you want to select a different icon.
Once you click OK, the macros will appear on the Quick Access Toolbar and will always be available while you are working on that same computer.
Adding a Macro Button to the Worksheet
You can also add a macro button to the worksheet by following these steps:
- On the Developer tab of the Ribbon, in the Controls group, click the Insert button. Choose Button (Form Control).
- Press and drag somewhere in the worksheet to create a button.
- The Assign Macro dialog box appears, which displays all of your macros. Select the desired macro and click OK.
- The button appears on the worksheet. You can change the text of the button while it is selected or at a later time, you can right-click the button and choose Edit Text. You can also format the button by right-clicking the button and choosing Format Control….

