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 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 Sum a Column in Excel: 3 Methods
Knowing how to sum a column in Excel is essential for managing budgets, financial reports, and large datasets. Whether youâre calculating sales totals, adding expenses, or analyzing business data, Excel provides multiple ways to add up a column efficiently. Many users wonder "how to add columns in E
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 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 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 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
Editing Excel Macros in Excel
Excel Macro is a set of actions that can be recorded, saved, used multiple times. This feature saves us a lot of time when dealing with repetitive tasks and huge data sets. We can always make changes to an existing Macro in Excel. There are two ways to record and run macros: Excel Commands Excel Vis
1 min read
How to Round Numbers in Excel?
Precision is important, but so is clarity. Whether you're preparing a financial report, managing inventory, or analyzing sales data, knowing how to round numbers in Excel can streamline your spreadsheets and make your data easier to understand. Excel offers several functions tailored for different r
13 min read
How to Change Date Format in Excel
You know that Excel is one of the best spreadsheets you can work on. Excel is the first preference of many users to create an impressive data set. Have you tried filling in the Date on the sheet? Date with the data is a common practice done by users in Excel to get information timeline. To help orga
8 min read