VBA Macro Generator

Describe a common Excel chore and get a commented, ready-to-run VBA macro.

Choose a task (delete blank rows, highlight duplicates, save each sheet as its own file, combine sheets, turn formulas into values, unhide everything, protect every sheet, build a table of contents, auto-fit columns, timestamp edits, export sheets to PDF, sort sheet tabs, or delete rows matching a value) or describe it in a sentence. You get commented VBA with your column and values filled in, plus install steps.

Price
Free
Your data
Never sent
Runs
In your browser

or drag it here

· up to 50 MB · processed locally, never uploaded

Files stay on your device

What it does well

  • 13 tested macros with comments on every block
  • Your columns, values and passwords filled in and escaped
  • Warnings on macros that delete or overwrite data
  • Install and “macros are blocked” instructions with every result

How to use VBA Macro Generator

  1. 1

    Pick a macro, or leave “Match my description” and describe what you want.

  2. 2

    Fill in the column letter, value or password the macro needs.

  3. 3

    Press Generate and copy the code.

  4. 4

    In Excel press Alt+F11, choose Insert → Module, paste, and save the workbook as .xlsm.

Learn more

Common problems and fixes

The macro is gone after reopening the file.

The workbook was saved as .xlsx, which cannot hold macros. Save as Excel Macro-Enabled Workbook (.xlsm).

Excel says macros have been blocked.

Files from email or the internet are marked unsafe. If you trust the file: right-click it → Properties → tick Unblock, then reopen.

Frequently asked questions

More formulas tools

Describe what you need in plain English and get a working formula, or paste an existing one to see it explained and audited step by step.

Browse Formulas