Spreadsheet Formula Writer
Writes Excel or Google Sheets formulas from a plain-English description. Explains each part and flags when a pivot table would be simpler.
The prompt
I'll describe what I want to calculate in a spreadsheet. Write the formula. Ask first if not clear: - Google Sheets or Excel? (Some functions differ.) - What columns/ranges am I working with? Give example cell references. Output: **The formula** — one line, ready to paste, with actual cell references. **Breakdown** — split into parts, explain each in one line. Table format: ``` Part What it does =IF( Start conditional A2>100, If A2 is greater than 100 ... ) ``` **Alternative approach** — if a pivot table, QUERY function, or a chart would actually solve the underlying problem better than the formula, say so and explain in 2-3 lines. **Common gotchas** — anything specific to this formula: circular references, division by zero risks, locale issues (commas vs semicolons), array formula requirements. Rules: - Use absolute references ($A$1) when the formula will be dragged. - Prefer newer functions when they simplify (XLOOKUP over VLOOKUP, FILTER over complex INDEX/MATCH). - If the calculation belongs in code, not a spreadsheet, say so. ## How to use it Paste this prompt with your calculation description. Paste the formula into the target cell. Verify against a small subset before applying to the whole sheet. ## Why it works Formulas fail silently when the syntax is right but the logic is wrong. Breaking them down inline lets you spot the bad part fast. The "alternative approach" catches the times when you're using a formula for something that wants a different tool entirely.
How to use it
I’ll describe what I want to calculate in a spreadsheet. Write the formula.
Ask first if not clear:
- Google Sheets or Excel? (Some functions differ.)
- What columns/ranges am I working with? Give example cell references.
Output:
The formula — one line, ready to paste, with actual cell references.
Breakdown — split into parts, explain each in one line. Table format:
Part What it does
=IF( Start conditional
A2>100, If A2 is greater than 100
...
)
Alternative approach — if a pivot table, QUERY function, or a chart would actually solve the underlying problem better than the formula, say so and explain in 2-3 lines.
Common gotchas — anything specific to this formula: circular references, division by zero risks, locale issues (commas vs semicolons), array formula requirements.
Rules:
- Use absolute references ($A$1) when the formula will be dragged.
- Prefer newer functions when they simplify (XLOOKUP over VLOOKUP, FILTER over complex INDEX/MATCH).
- If the calculation belongs in code, not a spreadsheet, say so.
How to use it
Paste this prompt with your calculation description. Paste the formula into the target cell. Verify against a small subset before applying to the whole sheet.
Why it works
Formulas fail silently when the syntax is right but the logic is wrong. Breaking them down inline lets you spot the bad part fast. The “alternative approach” catches the times when you’re using a formula for something that wants a different tool entirely.
✦ More like this
Related prompts
Book Recommender (Honest)
Recommends 3-5 books based on what you actually liked before. No 'Sapiens for the 400th time.' Includes honest reasons and what NOT to expect.
Chart Type Chooser
Given the data you have and the question you're answering, picks the right chart type and explains what to avoid. No dual-axis, no pie chart traps.
Code Refactor Helper
Refactors a function or file without changing behavior. Explains what changed and why, and flags any behavior it wasn't sure about.