If you are tired of performing the same series of tasks repeatedly, then Excel Macro is here to save you from this tedious and monotonous work. Excel Macro is a record of an action or a series of actions that can be saved and later you can perform this series of tasks as many times as you like by simply running the Macro. So, let’s explore how we can save a Macro.
5 Easy Steps to Save Macro in Excel
In this section, we will demonstrate how to save macro. Follow the steps below.
Step 01: Activate Record Macro Option
- First, we have to record a macro. To do that, go to the Developer tab and click on Record Macro.
- After clicking on the Record Macro, you will see a dialogue box like this.
Step 02: Input Macro Name, Short Key, and Store Location
- In the Record Macro Dialogue Box, there are 3 fields you need to fill.
- In the Macro name box, give a suitable name for the macro (The name must not have any space).
- In the Shortcut key box, give a shortcut key that you will use for running the macro.
- In the Store macro box, there are three options.
- Choose Personal Macro Workbook if you want to run the Macro for every workbook.
- Choose New Workbook if you need to run the macro in a new workbook.
- Choose This Workbook if you want to run the macro in this workbook only.
Step 03: Perform a Series of Actions to Record Macro
- For illustration purposes, we are showing an Example Macro. In this macro, we will perform 3 tasks.
- Change the background color of any selected cell to green.
- Change the font size to 14 and
- Make the font bold.
- So, we select a cell, then go to the Developer Tab, and click on Record Macro.
- Now in the Dialogue Box, we input the following.
- Now we go to the Home tab and perform the 3 tasks mentioned above sequentially.
Step 04: Stop Recording of Macro
- Now we again go to the Developer tab and click on Stop Recording.
- Consequently, our macro has been recorded.
- Now, we select another cell and run the macro by clicking ctrl+f.
- And we get the desired result.
Step 05: Save Excel File in XLSM Format
- Now, to run the macro again even after closing the file, we need to save the file as an xlsm To do so, first, go to the File Tab.
- You should see a new wind like this below.
- Now go to Save As. In the File type drop-down menu. Select Excel Macro-Enabled Workbook(*.xlsm). Then click Save.
- Now even if you close and reopen the workbook, you can still run the macro by clicking ctrl+f.
Things to Remember
- If you don’t have the Developer Tab enabled, you have to enable it first. Check this article for enabling Developer Tab
- You must perform the tasks sequentially while recording Macro. Otherwise, the result might be different than expected.
- If your excel file is xlsx type, you don’t have to save this as an xlsm file to enable the Macro as macro is by default enabled in the xlsx file.
If you find this article helpful, please share this with your friends. Moreover, do let us know if you have any further queries.