Excel VBA macro generator
Get ready-to-use Excel macros, with commented code and the installation steps.
1. What should the macro do?
2. Settings
Install the macro
Save a copy of your file before running a macro: its actions cannot be undone with Ctrl + Z.
3. VBA code
How to use the VBA macro generator
Get ready-to-use Excel macros, with commented code and the installation steps.
-
Choose the task
Blank rows, duplicates, PDF export, merge, table of contents, protection…
-
Set the parameters
Sheet, column, folder, password depending on the macro.
-
Install the macro
Copy the code into the VBA editor (Alt + F11) and run it.
About the VBA macro generator
VBA macros automate repetitive Excel tasks: deleting blank rows across thousands of lines, exporting each tab to PDF, merging sheets or timestamping entries takes a second instead of an hour.
Each macro is short, readable and commented so you understand what it does. Save your workbook as .xlsm and keep a backup copy: a macro cannot be undone with Ctrl + Z.
Frequently asked questions about the VBA macro generator
Do macros work on Mac?
Yes, with Excel for Mac (VBA editor through Option + F11 or the Developer tab). They do not work in Excel for the web or Google Sheets.
Excel blocks my macro. What can I do?
For a downloaded file, right-click, then Properties, then Unblock, and then enable the content. Never enable macros in a file of unknown origin.
Can I edit the code?
Yes. It is commented (in French) so it can be adapted easily.