Create Custom Excel Shortcuts [2 Ways]
Article by: Avantix Learning Team
Updated: February 13, 2017
Applies to: Microsoft® Excel® 2010, 2013 and 2016
Microsoft Excel has many built-in shortcuts as well as the ability to navigate and select in the Ribbon using the keyboard. However, you may also want to write your own keyboard shortcuts for specific commands.
Unfortunately, Excel doesn’t offer a keyboard assignments command similar to the one available in Microsoft Word. In Word, you can assign keyboard shortcuts through the Options command on the File tab. In the Customize Ribbon category, there is a Keyboard Shortcuts Customize button that is not available in Excel.
So, you have a couple of options in Excel. You can add buttons to the Quick Access toolbar (which are automatically assigned Alt shortcuts) or you can write a macro using the Macro Recorder.
Option 1: Create a keyboard shortcut by customizing the Quick Access Toolbar
To customize the Quick Access Toolbar and create keyboard shortcuts:
- Click on the File tab in the Ribbon and then click on Options.
- Click on the Quick Access Toolbar category on the left.
- From the drop-down menu under Choose commands from, select All Commands.
- Click on the button you wish to add.
- Click on Add.
- Continue adding buttons.
- If you wish to re-order buttons, click on the button in the Customize Quick Access toolbar pane on the right and click on the Move Up or Move Down arrow buttons.
- Click on Close.
Once you have added the desired buttons, Excel assigns keyboard shortcuts automatically to the buttons based on the order in the Quick Access toolbar. For example, the first button can be accessed by pressing Alt and then 1, the second button by pressing Alt and then 2 and so on.
Option 2: Create a macro using Excel’s Macro Recorder
You can also add a keyboard shortcut by recording a macro. In Excel, you can record a macro to automate specific actions and you can assign a keyboard shortcut to the macro. To keep things simple, we’ll use the Record Macro button on the View tab in the Ribbon.
You’ll be using the Record Macro dialog (below) to create keyboard shortcuts:
To create a macro and assign a keyboard shortcut:
- Open the file you wish to use or create a new workbook.
- Click on the View tab in the Ribbon.
- Click on the Macros button and select Record Macro. A dialog box appears.
- Under Macro Name, name the macro (no more than 255 characters and do not include spaces or begin with a number or an underscore).
- Under Shortcut key, enter a keyboard shortcut. For example, type Shift + H (this would assign Control + Shift + H as the shortcut). By adding Shift, you are less likely to create the same shortcut as a built-in Excel shortcut.
- Under Store macro in, choose This Workbook, New Workbook or Personal Macro Workbook. For global shortcuts, save the macro in the Personal Macro Workbook which is launched on startup and is hidden by default. If you store a macro in another workbook, it will need to be open to run the macro.
- Under Description, you may enter a description.
- Click on OK.
- Perform the actions you wish to record. For example, click on the Paste button on the Home tab, choose Paste Special and then click on Values in the dialog box. All of your actions are being recorded.
- Click on the View tab, click on the Macros button and then select Stop Recording.
- Try pressing the keyboard shortcut combination that you assigned to run the macro.
When you use the Macro Recorder, Excel writes the code for the macro using VBA (Visual Basic for Applications). If a macro you created in the Personal Macro Workbook doesn’t work as expected, you will probably want to delete it.
To delete a macro that is stored in the Personal Macro Workbook, you will need to unhide the workbook first. To unhide the Personal Macro Workbook, click on the Unhide Button on the View tab, click on Personal and click on OK. To delete a macro, click on the Macros button on the View tab and choose View Macros. Click on the macro you wish to delete and click on the Delete button. Be sure to hide the Personal Macro Workbook again using the Hide button on the View tab.
If you have displayed the Developer tab in the Ribbon, Record Macro as well as other useful buttons appear in this tab as well.
Copyright 2017 Avantix Learning Inc.
Recommended Microsoft Excel training courses
You may also like
You can import or convert a PowerPoint presentation in PPTX format to Google Slides format in several ways. Google Slides will try to convert a PowerPoint presentation to compatible objects, tools and fonts but these programs do have differences so don’t expect a perfect conversion.
A pivot table can be deleted in an Excel workbook in several ways. You can delete a pivot table, convert a pivot table to values or clear data and customizations from a pivot table to reset it. When a pivot table is created from source data in a workbook,
Depending on your country or region, Excel may display decimal points or dots instead of commas for larger numbers. The decimal point (.) or comma (,) is used as the group separator in different regions in the world. You can change commas to decimal points or dots or vice versa in your Excel workbook temporarily or permanently.
Microsoft, the Microsoft logo, Microsoft Office and related Microsoft applications and logos are registered trademarks of Microsoft Corporation in Canada, US and other countries. All other trademarks are the property of the registered owners.
Avantix Learning | 1 Yonge Street, Suite 1801 (Toronto Star Building), Toronto, Ontario, Canada M5E 1W7 | email@example.com