Customize this prompt (fill variables)
How to use this prompt
This ChatGPT Excel formula debugging prompt is for an existing formula that returns an error or an unexpected result. Instead of asking for a replacement without context, you supply the formula, the relevant cell ranges, your Excel version, and a small example of the intended calculation. The result should distinguish a likely cause from a confirmed one and give you a correction you can test in a copy of the workbook. You do not need to upload the whole file.
HOW TO USE
1. Make a copy of the workbook. Prepare five to ten non-sensitive example rows with cell addresses and the same data types as the failing case.
2. Copy the prompt and replace each double-curly-brace variable. Include the exact error or incorrect value, not just “it does not work.”
3. State your Excel version, platform, function language, and argument separator. If you do not know a setting, say so rather than guessing.
4. Paste the completed prompt into ChatGPT and answer any essential clarification questions.
5. Try the proposed formula only in the workbook copy. Run the baseline and edge-case checks; report the actual results if the issue remains.
VARIABLE GUIDE
Replace each double-curly-brace placeholder with your information.
{{EXCEL_VERSION}} — Excel edition and platform, such as Microsoft 365 for Windows or Excel 2019 for Mac.
{{LOCALE}} — Function language, regional settings, and whether arguments use commas or semicolons.
{{GOAL}} — The calculation in plain language, including rules for blanks, duplicates, and excluded records when relevant.
{{CURRENT_FORMULA}} — The exact failing formula, including equals sign, punctuation, and sheet references.
{{SHEET_LAYOUT}} — Relevant cells or columns, headings, data types, and the cell containing the formula.
{{SAMPLE_ROWS}} — A small anonymized example with original row numbers and values; preserve the structure of the bug.
{{OBSERVED_RESULT}} — The exact error message or wrong value currently returned.
{{EXPECTED_RESULT}} — The correct result for the sample and its rationale, or “unknown” if you need help deriving it.
WORKED EXAMPLE
Open the example input and output sections below for a fictional, author-written demonstration. No real user result or live AI-tool test is claimed.
EXPECTED OUTPUT
Expect one proposed formula, a short explanation of the actual change, and checks you can reproduce. If the supplied information is insufficient, a good response asks for missing details instead of presenting an unsupported fix. The test table must distinguish an expected value from a value actually produced by Excel.
TIPS AND COMMON MISTAKES
• Keep the example small but preserve the failure: a date stored as text should not become a real date when you anonymize it.
• Include one matching and one non-matching record for a conditional calculation. A sample containing only matches cannot reveal every filtering mistake.
• If a formula is copied down or across, give the original and destination cells so relative and absolute references can be checked.
• Do not replace an error with zero until you know zero is the intended business outcome. Otherwise the spreadsheet may look fixed while remaining wrong.
LIMITATIONS AND REVIEW
ChatGPT may suggest valid-looking syntax that does not match your Excel edition or workbook rules. This prompt cannot inspect hidden sheets, named ranges, or formatting unless you describe them. The example above is author-written and its arithmetic was checked independently; it was not tested in Excel or run through a live ChatGPT session. Validate changes in Excel before using them in reporting, payroll, or other consequential work. Never paste passwords, account numbers, or confidential customer data into the prompt.
RELATED RESOURCES
Debugging Assistant — Use this instead when the failure is in application code rather than an Excel formula.
https://prompttai.com/prompts/debugging-assistant
Prompt Optimizer — Refine the input structure when the spreadsheet issue needs a more specific prompt.
https://prompttai.com/tools/prompt-optimizer
Example: what to expect
Example input
Example output
Variables explained
| Variable | What to enter |
|---|---|
{{EXCEL_VERSION}} |
Excel edition and platform, such as Microsoft 365 for Windows or Excel 2019 for Mac. |
{{LOCALE}} |
Function language, regional settings, and whether arguments use commas or semicolons. |
{{GOAL}} |
The calculation in plain language, including rules for blanks, duplicates, and excluded records when relevant. |
{{CURRENT_FORMULA}} |
The exact failing formula, including equals sign, punctuation, and sheet references. |
{{SHEET_LAYOUT}} |
Relevant cells or columns, headings, data types, and the cell containing the formula. |
{{SAMPLE_ROWS}} |
A small anonymized example with original row numbers and values; preserve the structure of the bug. |
{{OBSERVED_RESULT}} |
The exact error message or wrong value currently returned. |
{{EXPECTED_RESULT}} |
The correct result for the sample and its rationale, or “unknown” if you need help deriving it. |
Tips for better results
Best used for: Troubleshoot an Excel formula and verify a minimal fix.
- Give the AI context first: who you are, who the audience is, and what “good” looks like for you.
- Ask for output in a specific format (bullets, table, markdown) when you need structure.
- If the result is close but not perfect, reply with “keep the structure, make it more…” — do not start over.
- For long tasks, split the prompt into steps instead of expecting one giant answer.
- Different tools behave differently — ChatGPT, Claude and Gemini each have their own style. Try this prompt on the tool you use most.
About ChatGPT — tool notes
OpenAI’s flagship chat assistant — strong reasoning, custom instructions, GPTs.
Enclose user variables in plain text; ChatGPT follows long instructions well. Use “Act as…” roles and numbered steps.
How to use this Productivity prompt effectively
What this prompt does
Diagnose a broken Excel formula using your version, sheet layout, and sample rows. Get a minimal correction plus checks that reveal whether it solves the right problem.
Getting the most out of it
- Copy the prompt and paste it into your AI tool of choice (ChatGPT).
- Fill the variables in curly brackets with your own topic, audience and tone — the customize button above builds a ready version for you.
- Review the first draft for facts and style before using it. AI output is a starting point, not a final product.
- Iterate: tell the AI what to keep and what to change. Small corrections beat re-typing the whole prompt.
Common mistakes to avoid
- Leaving the {{variables}} unfilled — the AI then guesses your topic.
- Expecting one output to be perfect — plan for 2–3 rounds of refinement.
- Pasting confidential information into public AI tools.