(Note: the video may not reflect the latest upgrades. Please use the guide below.)
Record and run the same macro on multiple Excel workbooks without coding
- Record the changes as a macro
- Run the macro on multiple workbooks without opening them
- Does not require VBA coding skills
Before you begin, add Loop Macro Format to Excel
– free trial gives you 14 days of full access to all features.
How to loop macro through multiple workbooks
Note: before you proceed, we recommend you back up the files. Once you execute a macro, the changes cannot be undone.
- Open one of the workbooks, where you want to make the changes. It will serve as a template.
- Limitation: macros from a Personal Macro Workbook are not available.
- Select the newly recorded macro – see how to record a new macro.
- Check the box Include files in subfolders, and the files will be added
- Uncheck the boxes for the files you want to exclude from processing
- Note: We’ve tried to make the processing as fast as possible. It runs in the background without opening the workbooks. Processing time depends on the number of files to process, file size, the extent of changes, and your computer processing powers.
- “done” – the macro was executed successfully
- “not processed” – the macro was not executed
- “error” – the macro failed with an error
How to record a macro on the fly with the Loop Macro feature
- Assign a descriptive name to the macro
- The option “Store macro in this workbook” will be selected by default
- Adding a shortcut key and description is optional
- Click OK The macro will begin recording Make the necessary changes you want to record.
- Or: use the keyboard shortcut combination Shift + Ctrl + M.
How to push the same changes to multiple workbooks [example]
Tip: if you have planned a long list of changes to the workbooks, we recommend you split the process into multiple steps and record smaller macros instead of one long maro.
- Back up the files before you proceed.
- Open one of the workbooks that will serve as a template, e.g. “North America_January”.
- Open XLTools tab In the Automation group, click Loop Macro A window will open.
- Add text in E1: “TOTAL:”
- Add the formula in cell E2: =SUM(C:C)
- Apply Green Data Bar conditional formatting to column C. This will visualize the relative amount of the order.
- Сlick the Stop Recording button on XLTools ribbon The Loop Macro window will open again.