What Is Macro In Excel? How To Use Macro In Excel?
During the use of Excel, we often have to repeat a certain task multiple times, which can be both boring and time-consuming. To solve this problem, we can use Macro in Excel. This is a function that allows us to automate tasks automatically. So what is Macro in Excel and how to use it? Let’s find out with Buffcom.net.
What is Macro in Excel and its role in Excel?
Macro in Excel (also known as VBA Macro) is a tool that allows recording a list of commands for a specific task. Instead of performing the same task repeatedly, Macro can automate these tasks on a range of data for you.
Using this special function brings benefits such as:
- Saving time
- Default formatting for a range of data
- Automatic execution thanks to pre-set tools
- Can be easily edited at any time
How to Use Macro in Excel?
To use Macro command when working with Excel 2016, Excel 2019, you can follow these steps:
Step 1: Open the Excel file where you want to perform the task. In the Developer tab on the toolbar, select Record Macro.
Step 2: A dialog box will appear. In the Macro name field, enter the desired name (should be related to the task to be performed).
Step 3: In the Shortcut key field, enter any shortcut key. Since the Ctrl key is already included, you only need to enter the remaining shortcut key. For example, instead of entering Ctrl + C, you only need to enter C.
Step 4: In the Store macro in field, select the location where you want to save the record. Choose the desired location from the options as shown in the figure.
Step 5: In the Description field, enter any notes about the record. Then press OK.
Step 6: In Excel, perform all the tasks you want to create for the Macro. For example, in the figure, we are highlighting text in red.
Step 7: To create the Macro, select the Macros option in the Developer tab.
When the dialog box appears, change the name and click Run.
The Macro will then immediately execute the tasks you have set.
How to Stop Macro in Excel?
To stop a Macro command, you only need to perform the following task:
In the Developer tab on the toolbar, select Stop Recording.
How to Save Macro?
Before saving the Macro, you need to stop recording the Macro. And remember not to close the Excel window when saving the Macro.
To save a Macro after completion, follow these steps:
Step 1: On the File tab of the toolbar, select Save as
Step 2: Then, name the file and select the location to save it. Under the Save as type section, select Excel Macro-Enabled Workbook. Then click Save.
That way, you have saved your Macro in Excel quickly, right?
How to Delete a Macro in Excel
After using the feature for a while, if you want to remove a Macro from Excel, do the following:
Step 1: On the Developer tab of the toolbar, select Macros
Step 2: When the window appears, under the Macro name section, simply enter the name of the Macro you want to delete. Then click the Delete button.
The Macro will be removed from Excel.
Some Notes When Performing Macro Commands
- Macro only performs operations on a specific data range. If you add rows or cells to the data, the Macro will not work.
- It is better to divide into small steps instead of using it for a long operation.
- Excel Macros can be linked to other VBA-supported Office programs.
- Before saving the Macro, you need to stop the operation.
Conclusion on Macros in Excel
So, Macros in Excel are commands that make the process of working on Excel convenient and capable of processing many complex tasks quickly, which are used and applied by Excel experts. Hopefully, you have gained more useful and interesting knowledge.
Additionally, to use other office computer skills, using licensed office software is important. To purchase licensed office software, contact Buffcom.net!