Learning centre · Macro Wizard

Build, test and manage your own Excel routines.

A complete practical guide, from your first description to editing, saving, reusing and recovering macros. Choose a section or work through the guide in order.

Start here

What Macro Wizard does.

Macro Wizard turns a plain-English description into VBA automation. Brief it as you would a developer: describe the data, the exact rules, the output and what must stay unchanged. Review the explanation and test the generated routine before saving it.

Create your first routine

The six-step workflow.

StepWhat to doCheck / next action
1. Open Assist ProOpen Excel, select the Assist Pro tab and check the active workbook. Save a backup before starting.The ribbon exposes Macro Wizard and the saved-macro controls.
2. Describe one taskName the sheet, table, columns, rules and output. Use Accounting Demo and AccountingDemoData for the practice workbook.A small, specific request is easier to review and test.
3. GenerateChoose Create Macro and click Get Macro after reviewing your prompt.Review the generated code, explanation and safety checks. Confirm the sheet and ranges.
4. ReviewCheck the explanation against your request. Look for deletion, overwriting, fixed ranges and undefined blank handling.Edit anything unclear before running.
5. Run and testRun on the copy. Check row counts, totals, known exceptions and known clean rows.Compare the result with the expected outcome and refine it where necessary.
6. Save and reuseChoose Save Macro / Save Last Macro, name the routine and select an available slot.Select the tested version from Saved Macros when the next file arrives.
Brief it precisely

Six things to decide before you generate.

Protect a copy

Keep the original table and answer-key fields unchanged. Macros can change many cells quickly.

One job per macro

Clean, test and report in separate stages. Start with text cleanup before duplicate testing.

Exact targets

Name Accounting Demo, AccountingDemoData and the headers exactly as they appear in Excel.

Exact business rules

Define valid values, thresholds and tolerances. For example, allow R0.02 when checking VAT.

A named output

Add or reuse Audit_Issue, or create a named report sheet. Do not overwrite source fields.

A reconciliation

Inspect both good and bad rows, check counts and run the routine twice.

Know your ribbon

What each macro control does.

ControlWhen to use itGood practice
Last Created Macro / Last Macro DetailReview the newest macro and its details.Check its target before running, especially after switching workbooks.
Edit Last MacroRegenerate the latest macro using additional instructions.Describe only the change and restate what must stay unchanged.
Run Last MacroRun the most recently generated macro again.Confirm the active workbook, sheet and data layout.
Save Macro / Save Last MacroKeep a tested macro in an available named slot.Use a unique name such as AP_VAT_Test_v1.
Macro Management / Saved MacrosSelect, run, edit or replace a saved routine.Check the purpose and version before running.
Edit Saved MacroRegenerate a saved macro with your requested changes.Choose Save as New if the original must stay available.
RecycleRestore the most recently deleted macro.Make an empty saved-macro slot available first.
Build a clear brief

The strong prompt formula.

Create a macro that [ACTION] on [SHEET/TABLE]. Use [COLUMNS]. Apply these exact rules: [RULES]. Put the result in [OUTPUT]. Do not [SAFETY LIMITS]. At the end, [SUMMARY/CONFIRMATION].

Copy-ready VAT practice example

Create a macro that checks supplier invoices in AccountingDemoData on the Accounting Demo sheet. Use Record_Type, Net_Amount, VAT_Rate and VAT_Amount. Compare VAT_Amount with Net_Amount multiplied by VAT_Rate, allowing an absolute difference of R0.02. Flag missing or invalid inputs separately. Add or reuse Audit_Issue and write a clear reason for each failed check. Keep source values and every row unchanged. At the end, report rows checked and exceptions found. Make a second run reuse the same output column.

This is a calculation check for the demo data. Confirm the applicable business and tax rules before adapting it to live work.

Get better results

Eight prompting habits that matter.

HabitUse this approachAvoidWhy / example
Be specificName the sheet, table and columns.“Check my data.”VBA needs a precise target, such as AccountingDemoData[VAT_Amount].
Give exact rulesState thresholds, tolerances and valid values.“Find strange entries.”For example, high risk if the absolute amount is at least R500,000.
Protect the sourceSay what must not change or be deleted.Assuming cleanup will preserve everything.Add flags without overwriting amounts.
Request an explanationAsk for a reason or status column.Colour-only output.Text in Audit_Issue is filterable and reviewable.
Use one macro per stageClean, test and report separately.One huge prompt.Shorter code is easier to validate.
Handle blanks explicitlyExplain whether blanks are valid, skipped or errors.Letting VBA guess.Blank and zero differ. A blank Approver can be a specified risk flag.
Define duplicatesList the fields that make a duplicate.“Remove duplicates.”Exact duplicates differ from potential duplicates. Keep the rows and explain the match.
Ask for a completion messageRequest counts and actions performed.No confirmation.Show rows checked and issues found so you can reconcile the result.
Examples you can adapt

Weak prompts, better prompts.

Cleanup

From vague to specific

Weak prompt: Clean this sheet.

Trim spaces in text columns of AccountingDemoData. Standardise known department names and highlight values that cannot be standardised. Do not delete rows.

Expected output: Clean text and highlighted exceptions.

Duplicates

From vague to specific

Weak prompt: Find duplicates.

On Accounting Demo, add or reuse Duplicate_Flag in AccountingDemoData. Flag exact duplicate rows and potential supplier-invoice duplicates where Counterparty, Document_No and Net_Amount match. Keep every row and explain the match.

Expected output: Duplicate_Flag with reasons.

Risk

From vague to specific

Weak prompt: Find risky transactions.

On Accounting Demo, add or reuse Risk_Level in AccountingDemoData. Mark High when Approver is blank, Approver equals Prepared_By, or the absolute Net_Amount is at least R500,000. Otherwise leave it blank. Preserve source fields.

Expected output: Repeatable classification using your defined rules.

Report

From vague to specific

Weak prompt: Make a report.

Create or replace Audit Exceptions from flagged rows in AccountingDemoData. Sort High, Medium, then Low, format as a table and show counts by Record_Type and Risk_Level. Leave the original table unchanged.

Expected output: A consistent exception report.

Refine a working routine

Edit safely and keep useful versions.

  1. Select the right macro. Choose Edit Last Macro or select a saved slot and click Edit. Read its name and purpose.
  2. Describe the exact change. For example, change a threshold from R500,000 to R250,000. Restate fields that must not be overwritten.
  3. Click Edit Macro and review. Confirm the new change is present and the existing rules remain.
  4. Run on test data. Compare the new result with the previous version. Check both affected and unaffected records.
  5. Choose Save as New or Overwrite. Save as New preserves the original. Use it until the new version is proven. Overwrite replaces the saved version.
Choose the right path

Recommended workflows.

GoalSequenceUse when / check
CreateDescribe → Get Macro → Review → Run → SaveNew automation. Test on a copy.
ImproveEdit → Describe changes → Regenerate → Review → Run → SaveNearly correct macro. Check that old rules remain.
ReuseSelect saved slot → RunExisting routine. Confirm sheet and column names match.
Modify savedSelect slot → Edit → Describe changes → Regenerate → Save as New or OverwriteRevised rules. Choose versioning deliberately and test the result.
RecoverRecycle → Review → Restore → RenameLatest deleted macro. An empty saved slot is required.
Find the right command

Quick feature selector.

I want to…UseRemember
Create VBA from a descriptionMacro WizardGive exact targets, rules and outputs.
See the newest macroLast Created Macro / Last Macro DetailReview it before running.
Change the newest macroEdit Last MacroRestate safety limits.
Run the newest macro againRun Last MacroCheck the active workbook and layout.
Keep a tested macroSave Macro / Save Last MacroUse a descriptive, unique name.
Use an older saved macroMacro Management / Saved MacrosSelect the correct slot and version.
Change a saved macroEditTest the regenerated version.
Keep old and new versionsSave as New MacroAdd a version number.
Replace the saved versionOverwriteOnly after testing.
Recover the latest deletionRecycleAn available slot is required.
Before you save

Testing and safety checklist.

CheckPass conditionIf it failsDemo test
ScopeOnly the named table or sheet changed.Restore the backup and narrow the prompt.Other worksheets and answer-key fields remain unchanged.
Row countNo rows disappeared unless deletion was requested.Restore and specify “do not delete rows”.AccountingDemoData still has 500 records.
Known exceptionA planted bad row is flagged.Make the rule more explicit.Use a row with a known issue for the rule being tested.
Known clean rowA valid row remains unflagged.Review blank and zero handling.Check a normal record as well as an exception.
AmountsTotals and signs remain unchanged unless requested.Restore and prohibit overwriting source fields.Reconcile Debit, Credit and Bank_Amount.
Repeat runA second run does not duplicate columns or sheets.Ask it to reuse or clear named output.Only one Audit_Issue column exists.

In the practice workbook, AA:AD contain Source_Row, Expected_Issue, Severity and Suggested_Macro_Test. Compare relevant flags with these expected-result fields and leave them unchanged. These fields are part of the table, rather than a separate hidden answer-key sheet.

When the result needs work

Troubleshoot a specific problem.

Wrong sheet changed

Likely cause: The target was not named.

State exact sheet and table names. Restore the backup, then rerun on a copy. Do not keep testing on the live file.

Too many false positives

Likely cause: The rule was subjective.

Add precise conditions and tolerances. Test known clean records. Avoid words such as “unusual” without a definition.

Macro stops on blanks

Likely cause: Blank handling was not defined.

Specify which blanks are skipped or flagged and include blank test cases. Do not automatically replace blanks with zero.

Second run breaks output

Likely cause: Existing columns or sheets were not handled.

Reuse, clear or replace named output. Test repeatability rather than creating unnamed copies.

One-time Excel setup

Allow Macro Wizard to access the VBA project.

If Macro Wizard cannot create or insert a VBA action, Excel may be blocking programmatic access to the VBA project. In Excel, open File → Options → Trust Center → Trust Center Settings → Macro Settings, then enable Trust access to the VBA project object model.

Close and reopen Excel, then try the workflow on a copy of a workbook.

Put the guide to work

Create your first saved routine.

Download the sample workbook, follow the interactive practice and save a routine once it passes your checks.