As quoted by Microsoft:
A macro is a series of commands and functions that are stored in a Microsoft Visual Basic module and can be run whenever you need to perform the task.
We strongly agree with the statement and really find Excel Macros very useful to automate tedious jobs. We have written couple of macros and you can find them here. In this post we are sharing the steps to Create, Run and Edit an Excel Macro.
First step is to create a Macro. For creating a macro, click on Tools in menu bar, select Macro and then Macros in sub menu as shown in figure below.
Clicking on Macros will open the below window. Type the name of Macro and click on Create button.
Clicking on Create button will launch the Visual Basic editor as below.
Write the code in the editor and save this Macro by closing the editor.
Select worksheet and run the Macro by clicking on Tools->Macro->Macros. Select the required Macro and click on “Run” button.
- Go to Tools->Macro->Macros. Select the Macro “Compare” and click on “Edit” button.
- This will launch the Visual Basic Editor.
- Change the code as requierd.
- Save the Macro.
We hope that you like the post. Feel free to give your suggestions and inputs in the comments section below.