How to Configure Macros in Excel
Last Updated :
13 Dec, 2023
An action or collection of actions can be recorded, named, stored, and executed as many times as necessary and whenever desired using an Excel macro. We can automate repetitive data manipulation and reporting processes that need to be done repeatedly by using macros. You can record a macro and save it with any name to run it whenever you open the workbook that contains this macro.
What are Macros in Excel
Macros in Excel are the recorded sets of actions and these actions can be executed to do repetitive tasks or perform complex operations.
A Macro is a sequence of commands or cations that you record, and run whenever needed. Macros in Excel are created using the Virtual Basic for Application(VBA) programming language.
How to Create Macros
This can be divided in two ways as follows:Â
1. How to Record a MacroÂ
Tip: While recording a Macro the user should be careful because a macro records everything even what went wrong and you have corrected it, so it is advisable to practice the task you want to perform once or twice before recording it. Â
Recording a Macro is a method that allows you to store the tasks performed by you. To Record a Macro the Developer tab on the Ribbon needs to be activated. The Developer tab contains all the Macro tools among the various other features.Â
2. How to Run a Macro
You can easily run a macro, once you have recorded and saved it into a workbook.
After recording a macro one needs to Run a macro to make use of it. Users can run a macro using the Macro command on the developer tab that is present on the Ribbon. To Run a Macro user can press a combination of shortcut keys, By clicking a button on the Quick Access toolbar or in a custom group in the ribbon. Â
How to Record a Macro in Excel
Step 1: Open a new Excel Workbook.Â
Step 2: Turn on the Developer Tab on the ribbon (The Developer tab is by default hidden).
To personalize the ribbon, do the following, Anywhere on the ribbon, use the right mouse button to choose (by clicking) Customize the ribbon.

Â
Step 3: Place a check in the Developer checkbox by selecting Customize the ribbon from the menu. Click “OK”.
Step 4: The developer tab has been added to the ribbon. To configure a macro, on the Developer tab, go to Code group and click Record Macro.
.png)
Â
Step 5: You’ll see the Record Macro dialogue box. Â
Give your macro a name and specify the shortcut that will run it. Click “OK.”
Things to remember
The macro name should start with a letter and contain no space, symbol, or punctuation marks.
- Shortcut key(optional): The shortcut key must be unique, for example, it shouldn’t be ctrl+v which is for paste
- Description: This is useful for you and the user for understanding the purpose of the macro.

Give the macro its name, shortcut key, and description.
Note: Every step you perform from now on will be recorded by the macro. For Example, We added some sample data in Book 1.

sample dataÂ
Let’s now change the header’s format and add some colors.

changing the header’s formatÂ
Step 5: Once you are done, go to the developer tab and click stop recording. The macro has recorded the steps.

all activities are recorded.
How to Run a Macro in Excel
You can now perform the same steps by running the macro.Â
Step 1: Open a new sheet (or wherever you want to run a macro) in Excel, and add the data.
Note: To see the recorded macro, Click on Macros in the Developer ribbon:Â

A list of recorded macros can be seenÂ
Step 2: Select the name of Macro. Click Run.

select the macroÂ
You could see the changes recorded in Macro are applied in the sheet.

Recorded macrosÂ
What is the use of Macro in Excel?
- Macros are recording of your daily routine task so that if the user wants to repeat the task it can be easily done by clicking a single button.
- Â Macros can be used to record the steps of inserting the data and formatting it. Â
What is the Macro-Enabled Format?
If you want to save your macro then you must save your workbook of macros in macro-enabled format i.e. *.xlsmÂ
How do I enable macros in a specific Excel file?
- Open your Excel file.
- Find and click the “Info” tab.
- Enable the macro content.
- Check your next session
How to delete a Macro?
Step 1: Click on the Developer tab, and Click Macros.Â
Step 2: From the list, click on the Macro, you want to delete, and click on the delete button.
Similar Reads
How to Record a Macro in Excel
Excel Macro is simply a record button that records a set of actions performed on Excel that can be run multiple times. For example, if you have to format some raw data on a weekly basis you can use a macro to record yourself formatting the data once and let Excel automate the task in the future. it'
11 min read
How to Create a Contingency Table in Excel
A contingency table, also known as a crosstab is used to show the relationship between two categorical variables. In Excel, we can make a contingency table using the pivot table function. They are best for summarizing the relationship between categorical variables. A Contingency table is just like a
4 min read
How to Change Chart Style in Excel?
Chart styles are like a handy toolkit for making your charts look awesome. They give you a bunch of cool styles with colors, patterns, labels, and titles. Basically, all the things that make your chart easy on the eyes and extra useful for understanding data trends. These styles also supercharge you
5 min read
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, i
5 min read
How to Remove Spaces in Excel
Have you ever wondered you keep searching data on Excel but it is not returning any values and many times you are trying to add columns or data but you are unable to do so? Well, these are some common problems we all have faced in our life. But do you know why it happens? This happens because of ext
8 min read
How to Change the Case of Texts in Microsoft Excel
Changing the case of text in Microsoft Excel is a powerful yet often overlooked feature that can help you standardize your data and improve readability. Whether you need to convert text to uppercase, lowercase, or capitalize each word, mastering this skill can significantly enhance your data present
6 min read
How to Autofill Months and Years in Excel?
Excel is a spreadsheet developed by Microsoft for Windows, macOS, Android, and iOS. The calculation, computation, visualization tools, pivot tables, and VBA are all available in excel. In a spreadsheet, you will find a large number of cells. The columns are named in alphabets and rows are named in n
3 min read
How to Use Concatenate in Excel
Unlock the full potential of your data management skills by mastering how to use CONCAT Function in Excel. This powerful function allows you to seamlessly combine text from multiple cells into one, streamlining your workflow and making your spreadsheets more efficient. Whether you're preparing compl
7 min read
How to Round With Doubles in Excel VBA
The round function is used to round the floating numbers to a particular decimal value. Rounding a number, where it has a long decimal value will give a good balance between accuracy and readability. It also helps in calculation and also to get a precise result. In real life, it is useful in doing m
5 min read
How to Create a Rolling Chart in Excel?
A chart range is a data range that automatically updates as the data source is changed. This dynamic range is then utilized in a graphic as the source data. As the data changes, the dynamic range updates instantaneously, causing the chart to refresh. A common necessity when developing reports in Exc
3 min read