Excel Macro Specification Writer Before You Record or Ask for VBA
Define exactly what a macro should do, check, and never do.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
[VERIFY] is an editorial flag, not a blank to fill. Wherever the prompt shows [VERIFY], check that item against a reliable source before you use it.
Help me write a clear specification for an Excel macro before anyone records it or writes VBA. The repetitive task I do by hand: [TASK_DESCRIPTION]. Sheets and ranges involved, with example data: [SHEETS_AND_RANGES]. How often I do it: [FREQUENCY]. What should never happen (delete data, overwrite, send email): [NEVER_RULES]. Ask me any question whose answer would change the specification. Then write it as a document I can give to a colleague or developer: purpose, trigger (button or shortcut), inputs and where they come from, step-by-step actions in plain words, outputs, checks before running (right sheet, no blank rows, a backup made), how errors are shown, what the macro must not change, and a rule that it must stop and tell the user rather than guess. Include edge cases (an empty sheet, a column in a different order, data that already exists) and a test table with Case, Starting data, Expected result and Actual result. Sample for an invented task, 'Combine monthly sales sheets into one table': sheet names like Sales_YYYY_MM; checks before (valid sheet names, no blank header, identical headings) and after (row count equals the sum of the sheets); must never delete source sheets or overwrite the summary without a backup; four test cases. Compare options and recommend the lightest that works: Power Query for cleaning, formulas for calculation, a recorded macro for repeated clicks, written code for logic, and say when a macro is the wrong tool. Finish with a safety checklist: save a copy, run on a test file, review code for lines that delete or send, use a macro-enabled file, tell colleagues what it does. Do not run code I do not understand from unknown sources, and my organisation's macro policy applies [VERIFY].
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.