Pages

Friday, March 9, 2012

Quickly run your macros with keyboard shortcuts (Excel 2000/2002/2003/2004/2007)

If you run a particular macro often, you may want to assign a keyboard shortcut to run it so you don't have to access the Macro dialog box each time you want to execute it. To do so, choose Tools | Macro | Macros from the menu bar. (In Excel 2007, go to the Developer tab and click the Macros button in the Code group. If you don't see the Developer tab, click on the Office button and then click the Excel Options button. Choose Popular on the left side and then make sure the Show Developer Tab In The Ribbon check box is selected.) Then, select the macro to which you want assign the keystroke combination and click the Options button.

When the Options dialog box opens, click in the Shortcut Key text box and press the key that you want to assign to the macro. By default, the shortcut key uses the [Ctrl] key in Windows and an [option][command] combination on the Mac platform. Keep in mind that there's a good chance you'll override an existing keystroke combination that's built into Excel, so it's a good idea to test the shortcut before assigning it to make sure you aren't disabling a shortcut you're likely to miss having available.

One way that you can reduce the impact on existing shortcuts is to use a [Shift] combination. To do so, click in the Shortcut Key text box, hold down the [Shift] key, and press the key you want assigned to the combination. For instance, if you hold down the [Shift] key and press the [G] key, you'll use the combination [Ctrl][Shift][G] to run the macro on a Windows system. Mac users can also use the [shift] key to create [option][command][shift] key combinations.

Finally, click OK to close the Macro Options dialog box. You can now close the Macro dialog box and run the macro using the appropriate shortcut key.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.