Excel Macro Shortcut Key (2 Suitable Ways)

In the following dataset, we have the Monthly sales data of a tech store. We’ll assign a macro shortcut key and edit an assigned macro shortcut key in Excel.

excel macro shortcut key


Method 1 – Using the Record Macro Option to Assign an Excel Macro Shortcut Key

Steps:

  • Go to the Developer tab.
  • Select the Record Macro option from the Code group.

Using Record Macro Option to Assign Excel Macro Shortcut Key

The Record Macro dialog box will open as shown in the following image.

Note: You can also use the keyboard shortcut Alt + L + R to open the Record Macro dialogue box directly from your worksheet.

  • Rename the Macro name. We have used the name Sample_macro.
  • In the Shortcut key box, type in the shortcut key combination you want to use to enable this macro. We used Ctrl + U (lowercase U).

editing Record Micro to create excel macro shortcut key

Note: Assigning the macro shortcut key is case-sensitive. If you enter an uppercase letter, the shortcut key combination will be Ctrl + Shift + your assigned key.

  • Click on the drop-down icon under the Store macro in option.

You will see 3 options in the drop-down menu.

  • Personal Macro Workbook → Choosing this option will permanently save this macro shortcut key for your workbook.
  • New Workbook → Selecting this will save the macro shortcut key in a new workbook.
  • This Workbook → By choosing this, the macro shortcut key will only be active in the current workbook.

  • Choose the This Workbook option from the drop-down. You can choose other options according to your requirements.
  • Click on OK.

  • Click on the Stop Recording option from the Code group under the Developer tab and your macro shortcut key will be added.

Read More: Types of VBA Macros in Excel


Method 2 – Editing an Excel Macro Shortcut Key of an Assigned Macro

Steps:

  • Go to the Developer tab from Ribbon.
  • Select the Macros option from the Code group.

Editing Excel Macro Shortcut Key of Assigned Macro

The Macro dialog box will be visible on your worksheet as shown in the following image.

Note: You can also use the keyboard shortcut Alt + L + PM to open the Macro dialogue box directly from your worksheet.

  • Choose the macro of which you want to edit the shortcut key.
  • Click on the Options as marked in the image given below.

The Macro Options dialog box will open.

  • Edit the Shortcut key according to your preference. We changed the shortcut key to Ctrl + R (lowercase R).
  • Click on OK.

editing macro shortcut key in Excel

  • You will be redirected to the Macro dialog box. Click on the Cancel option.

  • Click on Stop Recording.

Read More: How to Edit Macros in Excel


Things to Remember

  • While assigning the macro shortcut key, if you have CAPS LOCK enabled, the shortcut key combination will be like Ctrl + Shift + your specified key.
  • If you have 2 or more workbooks that have macros that contain the same macro shortcut key, the macro that will run is the macro that is alphabetically first in the list of available macros.

Download the Practice Workbook


Related Articles

Get FREE Advanced Excel Exercises with Solutions!
Kawser Ahmed
Kawser Ahmed

Kawser Ahmed is a Microsoft Excel Expert, Udemy Course Instructor, Data Analyst, Finance professional, and Chief Editor of ExcelDemy. He is the founder and CEO of SOFTEKO (a software and content marketing company). He has a B.Sc in Electrical and Electronics Engineering. As a Udemy instructor, he offers 8 acclaimed Excel courses, one selected for Udemy Business. A devoted MS Excel enthusiast, Kawser has contributed over 200 articles and reviewed thousands more. His expertise extends to Data Analysis,... Read Full Bio

1 Comment

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo