Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Insert Keyboard Shortcuts in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel doesn’t let you insert custom keyboard shortcuts for arbitrary actions directly, but you can assign shortcuts to macros or ribbon commands using the Quick Access Toolbar or Customize Ribbon feature. This lets you trigger frequently used functions with a key combination, speeding up workflows without clicking menus. You’ll need Excel 2010 or later, and a basic understanding of macros if creating custom shortcuts.

What You'll Need

  • Microsoft Excel 2010 or later (Windows or Mac)
  • Permission to enable macros if creating custom shortcuts
  • A specific command or macro you want to assign a shortcut to

Step-by-Step

  1. Open Excel and the workbook where you want to assign the shortcut.
  2. Click the File tab, then select Options to open the Excel Options dialog box.
  3. In the left panel, choose Quick Access Toolbar.
  4. Under Choose commands from, select All Commands or Popular Commands, depending on what you’re assigning. Scroll the list to find the command you want (e.g., Save As, Insert Comment, or a custom macro).
  5. Click the command to highlight it, then click the Add button to move it to the right-hand list under Quick Access Toolbar.
  6. Click OK to close the dialog. The command now appears on your Quick Access Toolbar above the ribbon.
  7. Hold down the Alt key on your keyboard. Numbers and letters will appear next to each item on the Quick Access Toolbar.
  8. Press the corresponding key shown next to your added command. For example, if your command is labeled "1", press Alt+1. This becomes your keyboard shortcut.
  9. To assign a shortcut to a macro, first create the macro: Press Alt+F11 to open the Visual Basic Editor, insert a new module, write your macro code, then save the workbook as a .xlsm file.
  10. Back in Excel, go to View > Macros > View Macros. Select your macro, click Options, and enter a letter (like "s") in the Shortcut key box. Press OK.
  11. Now press Ctrl+Shift+letter (e.g., Ctrl+Shift+S) to trigger the macro. Note: You cannot use Ctrl+letter alone, as those are reserved.
  12. To assign a shortcut to a ribbon command not on the Quick Access Toolbar, go to File > Options > Customize Ribbon.
  13. Under Customize the Ribbon, select the tab where you want the command to appear (e.g., Home, Insert).
  14. Click New Group to create a custom group, then rename it if desired.
  15. From the Choose commands from list, pick your command and click Add to move it into your new group.
  16. Click OK. Then follow steps 7–8 above to use Alt+number to trigger it.

Common Mistakes

  • Trying to assign Ctrl+X, Ctrl+C, or Ctrl+V as custom shortcuts — these are system-reserved and cannot be overridden.
  • Forgetting to save the workbook as .xlsm when using macros — without this, the macro and shortcut will be lost when closing the file.
  • Using a shortcut letter already assigned to another command — Excel won’t warn you, but the wrong function may trigger.
  • Expecting shortcuts to work across all workbooks — shortcuts tied to macros only work in the file they were created in, unless saved in Personal Macro Workbook.
  • Not pressing Alt first — you must hold Alt to see the access keys, then press the number or letter assigned to your command.

Tips

  • Use the Personal Macro Workbook (PERSONAL.XLSB) to store macros you want available in all workbooks. To access it, record a macro, then choose "Personal Macro Workbook" in the Store macro in dropdown.
  • Choose a mnemonic shortcut — for example, use Ctrl+Shift+T for "Toggle Comment" to make it easier to remember.
  • Test your shortcut immediately after assigning it — click elsewhere in the sheet and press the combination to confirm it works.
  • Limit custom shortcuts to five or fewer per workbook to avoid confusion. Too many reduce usability.
  • If you’re using Excel on a Mac, the shortcut keys differ: use Command instead of Ctrl, and Option instead of Alt for macro shortcuts.
  • Use the Quick Access Toolbar method for non-macro shortcuts — it’s faster and doesn’t require coding.

Troubleshooting

  • If Alt+number doesn’t work: Ensure the Quick Access Toolbar is visible. If it’s hidden, right-click the ribbon and select Show Quick Access Toolbar below the ribbon.
  • If the macro shortcut doesn’t trigger: Check that the workbook is saved as .xlsm and macros are enabled. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings and select Enable all macros (temporarily for testing).
  • If Excel freezes after pressing a shortcut: You may have created an infinite loop in your macro. Press Esc to stop execution, then open the VBA editor (Alt+F11) and debug the code.
  • If the command doesn’t appear in the list: Try selecting All Commands instead of Popular Commands. Some commands only show under All Commands.
  • If you can’t find the macro in View Macros: Make sure you saved it to the correct location. Check whether it’s in This Workbook or Personal Macro Workbook.
  • If shortcuts disappear after restarting Excel: The file may not have been saved with macros enabled. Close and reopen the .xlsm file, then reassign the shortcut.

Frequently Asked Questions

Can I assign Ctrl+S as a custom shortcut in Excel?

No. Ctrl+S is reserved by Excel for the built-in Save function and cannot be reassigned.

Do keyboard shortcuts work on Mac Excel?

Yes, but the keys differ: use Command instead of Ctrl, and Option instead of Alt. Macro shortcuts use Command+Shift+letter.

Why can’t I assign a shortcut to a ribbon button I just added?

You can’t assign a direct key combination to ribbon buttons. Instead, add the button to the Quick Access Toolbar, then use Alt+number to trigger it.

Can I use keyboard shortcuts for conditional formatting?

Not directly. You can record a macro that applies conditional formatting, then assign a shortcut to that macro.

What happens if two macros have the same shortcut?

Excel will trigger whichever macro was loaded last or is active in the current workbook. Avoid duplicate shortcuts to prevent errors.

Is there a limit to how many custom shortcuts I can create?

There’s no hard limit, but Excel only shows up to nine Quick Access Toolbar items with Alt+number shortcuts (1-9). For more, use macro shortcuts with Ctrl+Shift+letter.