How to Run a Macro with Custom Keyboard Shortcut in Excel

Follow the below steps to assign a keyboard shortcut to execute a Macro:

Step 1. Go to View >> Macros >> View Macros – to pop-up Macro dialogue box [keyboard shortcut – Alt+F8]

Step 2. Select Macro from the list (e.g. updateText) and Press “Options”, to pop-up Macro Options

Step 3. Give any specific text in shortcut key input [e.g. Ctrl+p] and Press “OK”. Close Macro list

Step 4. Just press your Shortcut key, e.g. Ctrl+p, to execute the macro.

How to Enable & Run a Macro in Excel? 6 Ways

We can record a macro in Excel or write from scratch in VB Editor. Excel provides different options to run a macro. In this article, we explore four different approaches to running a macro in an Excel application.

Even while executing an Excel macro is a straightforward process for seasoned users, it might not be clear to newbies. You will discover numerous ways to execute macros in this article, some of which may entirely alter the way you interact with Excel files.

The below macro will write the text “Geeks for Geeks” in cell B5

Sub updateText()

ActiveSheet.Range(“B5”).Value = “Geeks for Geeks”

End Sub

Similar Reads

How to Run a Macro from Excel Ribbon

Follow the below steps to run a macro in the Macro dialogue box:...

How to Run Macro from VBA Editor

Follow the below steps to run a macro in VBE:...

How to Run a Macro with Custom Keyboard Shortcut in Excel

Follow the below steps to assign a keyboard shortcut to execute a Macro:...

How to Create a Macro Button in Excel

Follow the below steps to add a shape in Excel to execute a macro:...

How to Create a Macro Button from a Graphic Object

Unfortunately, button controls cannot have their appearance customized, which is why the button we just constructed does not look very beautiful. You can use shapes, icons, pictures, WordArt, and other things to create a really lovely Excel macro button....

How to Add a Macro Button to Quick Access Toolbar

The macro button added to a worksheet looks nice, but it takes time to add a button to every sheet. Add your preferred macro to the Quick Access Toolbar to make it accessible from anywhere....

FAQs on Macro in Excel

Q1: What is the main usage of macro?...

Contact Us