What is a macro in Excel? How to create and run a Macro in Excel

Macros are small programs that help you automate repetitive tasks that you use in Excel. Recording macros is recording the steps in VBA code (Visual Basic for Applications). The following article helps you do not need to know the language of VBA programming but still help you create small macros and re-run macros whenever necessary.

Macros are small programs that help you automate repetitive tasks that you use in Excel. Recording macros is recording the steps in VBA code (Visual Basic for Applications). The following article will help you do not need to know the language of VBA programming but still help you create small macros and re-run macros whenever necessary.

What is a macro in Excel? How to create and run a Macro in Excel Picture 1What is a macro in Excel? How to create and run a Macro in Excel Picture 1

Turn on the Developer tab in Excel

If your Excel software does not have a Developer tab , you can turn it on in the following way. On the File (1) -> choose Options (2) .

What is a macro in Excel? How to create and run a Macro in Excel Picture 2What is a macro in Excel? How to create and run a Macro in Excel Picture 2

Excel Options window appears, select Customize Ribbon (3) -> Check in Developer (4) => Select OK (5) .

What is a macro in Excel? How to create and run a Macro in Excel Picture 3What is a macro in Excel? How to create and run a Macro in Excel Picture 3

The Developer tab has appeared on the Ribbon. You can now use macros for excel.

How to record a Macro

Recording a Macro is quite simple, but note that the Macro Recorder will record the entire process you perform. If you make a mistake during recording, that action will be logged. So be very careful during Macro recording to avoid losing time recording offline.

The operation to record a Macro is as follows:

(1) On the Developer tab, select Record Macro . The Record Macro windowappears.

(2) You correct the Macro name to make it easier to remember. Click OK.

And start performing the operations on Excel that you want to record.

What is a macro in Excel? How to create and run a Macro in Excel Picture 4What is a macro in Excel? How to create and run a Macro in Excel Picture 4

(3) When you want to stop recording Macro, on the Developer tab, click Stop Recording.

What is a macro in Excel? How to create and run a Macro in Excel Picture 5What is a macro in Excel? How to create and run a Macro in Excel Picture 5

Run the recorded Macro in Excel

Open the Macro dialog box by clicking the key combination Alt + F8 or in the Developer tab select Macro. Macro window appears.

(1) Select the Macro command youwant to apply.

(2) Select the area where you want to apply the Macro command.

- All Open Workbooks: applies to all open windows.

- This Workbooks: applies to the window you are selecting.

(3) Select Run to run the Macro.

What is a macro in Excel? How to create and run a Macro in Excel Picture 6What is a macro in Excel? How to create and run a Macro in Excel Picture 6

The macro will be run and the calculations will be performed in turn as you have noted earlier.

Save the Macro file

Please note, Macro File cannot be saved as a normal Excel file format (.xlsx).

If you want to save all Excel and Macro files, select File ->   Save as -> Save as type : Choose Excel Macro-Enable Workbook . The saved file will be saved as a .xlsm file.

If you only want to save the VBA code of the Macro, You press Alt + F11 . The Microsoft Visual Basic for Applications window appears. Right-click on the Module containing the VBA code of the Macro to save. Select Export file and save Macro as .bas file.

What is a macro in Excel? How to create and run a Macro in Excel Picture 7What is a macro in Excel? How to create and run a Macro in Excel Picture 7

Above Software Tips guide you the easiest steps to record macros and run macros in Excel. Good luck!

5 ★ | 1 Vote