AI Prompts for Excel, Documents and Debugging: State Your Setup First
Image generated with AI.
Wrong Excel formulas are usually right for another setup. One five-line block plus three AI prompts for Excel, documents and debugging that fit your install.
Most wrong AI answers are not wrong: they are correct for a different setup. These AI prompts for Excel, documents and debugging start with five lines that name your app, your revision and your runtime.
The Answer Is Correct - in Someone Else's Setup
The model does not see your screen. It sees the text you paste, and that text rarely says which Excel you have, which language your installation is in, or which revision has to match. Where a fact is missing it does not refuse: it fills the gap with the most common case - Microsoft 365, US English, the latest version of the file, a clean environment. A tailor who was never given your measurements still hands you a suit; it is simply not yours.
One calibration first: this is not a claim about how the model works inside, but about what it can see. A prompt can be excellent and still produce a result you cannot use if it was written for a setup that is not yours.
Three Failures That Do Not Look Like Failures
First, the noisy one: a formula that uses functions your installation lacks, or names your language does not recognise, and returns #NAME?. Second, the reference that does not land: the obligations table is correct for the previous draft, and the cited section does not exist in your copy. Third, the fix that works somewhere else: the hypothesis is confirmed in a runtime that is not the one that failed. Only the first announces itself.
The Five Lines That Replace the Guess
Five lines, always the same five: the app with its version or plan (desktop Excel 2019 against Microsoft 365, or Google Sheets); the language and separator convention, comma or semicolon; the shape of what you have (sheet and column headers, or the document with its date and sender, or the stack with its versions); the last change (the deploy, the edit, the import); and the error exactly as it appears, plus what you already ruled out.
Write them once in a text file and paste them unchanged above any of the three prompts. And this is not the advice to hand over more context: it is the opposite, five lines that replace the assumption the model would otherwise make for you. If you do not know your version, look at it first; "I do not know my version" is a valid thing to write.
Prompt 1 - AI Prompts for Excel Formulas That Run in Your App
What the Prompt Returns
The catalogue prompt takes the request in plain language and returns five parts: the exact formula to paste; what each part does; an example with sample data; the common errors of that formula; and the Google Sheets equivalent when it differs. Three rules ride along: prefer modern functions such as LET, FILTER or XLOOKUP when they fit, warn when array entry (Ctrl+Shift+Enter) is needed, and note locale differences between comma and semicolon. See Excel & Google Sheets Formula Assistant.
Why the Setup Block Is What Makes It Work
Those rules are a policy that has to be resolved against your installation. Microsoft's own reference for XLOOKUP lists it as applying to Excel for Microsoft 365, Excel 2024, Excel 2021 and the web app, and the same page states it is not available in Excel 2016 and Excel 2019 (Microsoft Support). Paste that formula into an older perpetual installation and the answer is #NAME?.
Function names are localised too: VLOOKUP is SVERWEIS in German, RECHERCHEV in French and BUSCARV in Spanish, and the argument separator follows the regional setting rather than the version (Formula Translator Academy). A prompt that never says "Excel 2019, Spanish installation, semicolon separator" gets the default answer: Microsoft 365 in English.
The Check, Outside the Chat
Paste the formula into an empty cell next to the sample row before you touch the real sheet. If it returns #NAME?, check separators and function names first, not the logic. And confirm the example arrives with the expected result, not only the formula.
Prompt 2 - The Document Read Against Your Revision
What the Prompt Returns
This prompt takes a long document with its length and language and returns five blocks: an executive summary in five bullets; a decisions and obligations table with item, deadline, owner and the consequence of a miss, limited to what the document explicitly states; risks and flags with the exact section reference; a table of numbers, dates and percentages; and open questions. Its rules: cite a section for every claim, never infer undeclared facts, mark uncertainty as [UNCERTAIN]. See Claude Long-Document Analyst.
The Setup Field Here Is the Revision
Because the rule is to cite references, the output depends on which copy you pasted: a useful reference is one that lands inside the document in your hand. Without a date, a version and a sender, nobody can tell whether the table describes the draft or the signed version. And this failure is quiet: the five blocks fill in the same way, they look correct, and one of them belongs to the previous revision.
The Check, Outside the Chat
Open your copy and verify three references at random. If one does not land, the problem is what you pasted, not the prompt. A revision without a date is a different document.
Prompt 3 - The Bug in Your Runtime, Not in a Generic One
What the Prompt Returns
This one takes the report, the stack with its language and framework, the logs and the recent changes, and walks six steps: reproduce it the fastest way; isolate it by bisecting between layers (network, data, code, environment); three hypotheses, each with the test that would confirm it; instrument it, saying what to log and where; fix and verify, meaning the smallest fix plus a regression test; and a five-line post-mortem. Its rules: ask for missing evidence instead of guessing, one hypothesis at a time, never "restart and try again". See Debugging Detective.
The Error Belongs to an Environment
The header fields are not decoration. Without the stack and its versions, the literal logs and the last change, the middle steps have nothing to work with, and the smallest fix tends to be a pattern from another version of the language or framework. The classic symptom is not "it does not work": it is that it works in one environment and not in the one that reported the problem.
The Check, Outside the Chat
The regression test has to fail before the fix and pass after it. As long as you cannot reproduce the problem, what you have is not a diagnosis, it is a plan.
What the Setup Block Does Not Fix
Three limits. The model cannot read your screen, so it will never know your exact build; if you do not say it, it does not exist for the model. Its knowledge of which functions exist has a cut-off date, so a function that shipped recently may not be on its list. And some differences throw no error: when a file moves between two spreadsheet apps, formulas that look identical can still return different results, while a sheet that arrives full of #NAME? is the loud version of the same mismatch (SpreadsheetWeb).
The Setup Block, Reused
The asset of this post is five lines in a text file, pasted above any of the three prompts. When an answer is not usable, the order to review is: which field of the setup did I not write; what shape does the output take; and only then rewrite the prompt. A prompt that gets reused breaks on the environment, not on the wording.
FAQ
Do I have to repeat the setup block every time? Yes: they are facts about that task, and keeping them in a text file makes pasting a gesture, not a chore.
What if I do not know my version? Write it anyway, as "desktop Excel, version unconfirmed". A declared gap lets the model tell you what to check; a silent one gets filled for you.
Does this make my prompt too long? No. Five lines that replace assumptions are not padding; trimming context and declaring setup are different moves that work together.
Does it work in ChatGPT, Claude and Gemini? Yes: the block is facts, not one model's syntax, and each catalogue prompt already carries its own rules.
State Your Setup Before You Ask
Two answers can both be good and still be useless to you, if they were written for another setup. Fix the five lines once, paste them above the prompt, and let the catalogue do the rest: Excel & Google Sheets Formula Assistant for formulas that run in your install, Claude Long-Document Analyst for a document read against your revision, and Debugging Detective for the bug in your runtime.
LikePrompts Editorial
Practical guides for getting the most out of AI prompts — written by the LikePrompts team.