Create Custom Excel Shortcuts (2 Ways)
by Avantix Learning Team | Updated March 24, 2021
Applies to: Microsoft® Excel® 2013, 2016, 2019 and 365 (Windows)
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.
Recommended article: 10 Excel Data Entry Tricks and Shortcuts Every User Should Know
Do you want to learn more about Excel? Check out our virtual classroom or live classroom Excel courses >
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.
1. Creating a keyboard shortcut by customizing the Quick Access Toolbar
To customize the Quick Access Toolbar and create keyboard shortcuts:
- Click the File tab in the Ribbon and then click on Options.
- Click the Quick Access Toolbar category on the left.
- From the drop-down menu under Choose commands from, select All Commands.
- Click the button you want to add.
- Click Add.
- Continue adding buttons.
- If you want to re-order buttons, click the button in the Customize Quick Access toolbar pane on the right and click the Move Up or Move Down arrow buttons.
- Click Close.
Commands appear in the Excel Options dialog box:
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.
2. Creating a macro with a keyboard shortcut using the 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 want to use or create a new workbook.
- Click the View tab in the Ribbon.
- Click Macros 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 can enter a description.
- Click OK.
- Perform the actions you want to record. For example, click Paste on the Home tab, choose Paste Special and then click on Values in the dialog box. All of your actions are being recorded.
- Click the View tab, click on Macros 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 Unhide on the View tab, click Personal and click OK. To delete a macro, click Macros on the View tab and choose View Macros. Click on the macro you want to delete and click Delete. Be sure to hide the Personal Macro Workbook again using Hide 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.
Subscribe to get more articles like this one
Did you find this article helpful? If you would like to receive new articles, join our email list.
This article was first published on February 13, 2017 and has been updated for clarity and content.
How to Fill Blank Cells in Excel with a Value from a Cell Above
How to Use Flash Fill in Excel to Clean or Extract Data (Beginner's Guide)
How to Quickly Delete Blank Rows in Excel
Microsoft Excel: Intermediate / Advanced
Microsoft Excel: Data Analysis with Functions, Dashboards and What-If Analysis Tools
Microsoft Excel: Introduction to Visual Basic for Applications (VBA)
Our instructor-led courses are delivered in virtual classroom format or at our downtown Toronto location at 18 King Street East, Suite 1400, Toronto, Ontario, Canada (some in-person classroom courses may also be delivered at an alternate downtown Toronto location). Contact us at firstname.lastname@example.org if you'd like to arrange custom instructor-led virtual classroom or onsite training on a date that's convenient for you.
Copyright 2023 Avantix® Learning
You may also like
Excel XLOOKUP Function (Syntax + Formula Examples)
The XLOOKUP function is a replacement for Excel's traditional VLOOKUP function (as well as HLOOKUP and INDEX / MATCH functions). It has a new set of arguments and is available in Excel 2021 and 365. It allows you to look up a value from an array in a range or table and return one or more results. One of the primary benefits of XLOOKUP is that it can look up from columns to the left in a data set and return a range.
How to Lock Cells in Excel (3 Ways)
It's easy to lock and protect cells in Microsoft Excel to prevent users from changing data or formulas. This involves a two-step process …
How to Stop or Control Green Error Checking Markers in Excel
In Microsoft Excel, errors are flagged with small green marker or triangle in the upper left corner of the cell. However, these indicators display when there may be an error but is, in fact, not an error.
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 |18 King Street East, Suite 1400, Toronto, Ontario, Canada M5C 1C4 | Contact us at email@example.com