15 ChatGPT Prompts for Excel & Google Sheets That Actually Work (Plus the Master Prompt That Stops Wrong Formulas)

Last updated: November 3, 2026 — prompts and example formulas checked for Excel (Microsoft 365) and Google Sheets syntax.

Ask ChatGPT for an Excel formula and you will get one in seconds. The problem nobody mentions: a wrong formula does not show an error — it shows a plausible number that is quietly wrong. It misses the last day of the month, counts a blank as zero, or totals the wrong region — and you find out after the sheet has been emailed to your boss. This is the number-one complaint in the spreadsheet communities on Reddit (r/excel, r/googlesheets), and it has a fix: the formula is rarely the problem. The prompt is.
Write the formula

Below: the one “Master Prompt” that experienced users wrap around every request, then 15 copy-paste prompts for the jobs people actually do — writing formulas, cleaning messy data, fixing errors, and building reports. Every example formula shown is real, working syntax you can test.

The Master Prompt: paste this before everything

AI cannot see your sheet. If you don’t describe it, the AI guesses — and guesses are where silent errors come from. Community experts call this the context-first rule: brief the AI like a new analyst you just hired.

Copy-paste Master Prompt:
“Act as an expert in [Microsoft Excel 365 / Google Sheets]. I need help with a formula.
My sheet: column A is [e.g. order date], column B is [region], column C is [product], column D is [amount]. Data starts in row 2 and runs to about row [500]. One row = [one order / one sale / one employee].
Task: [describe the result in plain words].
Rules: [e.g. only count rows where status is ‘Paid’; dates are real dates, not text; a blank amount means unknown, not zero].
Give me: (1) the single formula and the exact cell to paste it in, (2) a one-line explanation of how it works, (3) two edge cases that could break it, (4) how to spot-check the result.
Here are 5 sample rows from my sheet: [paste 5–10 rows — remove names, phone numbers and anything private first]”

Those four outputs — formula, explanation, edge cases, spot-check — are what separate a usable answer from a dangerous one. Now the 15 prompts. In each, replace the [brackets] with your own columns.

One sheet, worked end to end

Prompts are easier to trust when you watch one fail, then watch the fix work. So here is the same sheet, twice. Five rows. Columns A to D, exactly like prompt 1: order date, region, product, amount.

Order dateRegionProductAmount
2026-01-05WestSoftware120
2026-02-14WestSoftware85
2026-03-02EastSoftware200
2026-04-10WestSoftware150
2026-01-20WestHardware90

The job: total West Software sales in Q1 2026. The right answer is 205 — 120 plus 85, and nothing else. The East row does not count. The April row does not count. The Hardware row does not count.

Ask without the date rule — just “total West Software sales” — and the formula you get back usually totals every West Software row it can see. That is 355. No error. No warning. A number that looks finished and is wrong by 150.

Now ask it the Master Prompt way, with the sheet described and the dates nailed down:

=SUMIFS(D2:D500, B2:B500, "West", C2:C500, "Software", A2:A500, ">=2026-01-01", A2:A500, "<=2026-03-31")

That one returns 205. Same data, same tool, different prompt. The 150 gap is the whole point of this guide: the formula was not the problem. The description was.

And one more habit worth stealing from prompt 12: whenever a total looks right, add the parts a second way. Here, 120 + 85 by hand. Five seconds. If the two numbers disagree, believe the hand check, not the formula.

Three errors you will meet, and what each one usually means

ErrorWhat it usually meansFirst thing to check
#N/AA lookup cannot find the valueThe code or name — a trailing space, a different spelling
#VALUE!The formula got the wrong kind of dataText sitting where a number should be — a date stored as text, a comma in an amount
#REF!A cell the formula needs is goneA deleted row or column the formula pointed at

Prompt 10 above turns any of these into a fix: paste the formula, describe the columns, and ask for the most likely cause, the exact fix, and one thing to check in your data.

Write the formula (prompts 1–5)

1. Multi-condition totals (SUMIFS without the headache)

Prompt: “Write a formula that totals the amount in column D, only where region in column B is ‘West’, product in column C is ‘Software’, and the date in column A is between 1 January and 31 March 2026. Use my Master Prompt context.”

Typical answer:

=SUMIFS(D2:D500, B2:B500, "West", C2:C500, "Software", A2:A500, ">=2026-01-01", A2:A500, "<=2026-03-31")

Dates are the classic trap — writing them as real date comparisons, as above, is what makes month-end rows count correctly.

2. Lookups that don’t die with #N/A (XLOOKUP)

Prompt: “I type a product code in F2. Give me a formula that finds it in column A and returns the price from column C. If the code isn’t found, show ‘Not found’ instead of an error.”

Typical answer: =XLOOKUP(F2, A2:A500, C2:C500, "Not found") — XLOOKUP is Microsoft 365 / newer Excel and current Google Sheets; on older Excel, ask the AI for the INDEX+MATCH version instead (say your version in the prompt).

3. Tiered rules (bonus, discount, grade)

Prompt: “Column B has monthly sales per employee. Give me a formula for column C: if sales are 10,000 or more, the bonus is 10% of sales; otherwise 5%.”

Typical answer: =IF(B2>=10000, B2*10%, B2*5%)

4. Category totals for a quick summary

Prompt: “Column A has expense categories (Food, Rent, Travel) and column B has amounts. Give me a formula that totals one category, e.g. Food.”

Typical answer: =SUMIF(A:A, "Food", B:B)

5. “Is there a simpler way?” — the most valuable prompt of all

Prompt: Add this line to any request: “If a PivotTable, filter or built-in feature does this better than a formula, tell me and give the steps instead.” Half the time, the honest answer is that you never needed the formula.

Clean messy data (prompts 6–9)

6. Fix names typed ten different ways

Prompt: “A2 has a company name with extra spaces, stray periods and mixed case, like ‘contoso ltd.’ Give me ONE formula that returns a clean version: ‘Contoso Ltd’.”

Typical answer: =PROPER(TRIM(SUBSTITUTE(A2, ".", ""))) — SUBSTITUTE removes the periods, TRIM kills extra spaces, PROPER fixes the case. (Known limit it should warn you about: it turns ‘IBM’ into ‘Ibm’ — ask it to protect all-caps words if that matters.)

7. Split full names into first and last

Prompt: “Column A has full names like ‘Ayesha Khan’. Give me formulas for column B (first name) and column C (everything after the first space). I’m in [Excel 365 / Google Sheets] — use functions my version actually has.”

8. Find and remove duplicates safely

Prompt: “My customer list in A2:A1000 may contain duplicate phone numbers in column C. First give me a formula that flags duplicates without deleting anything. Then tell me the safe steps to remove them on a COPY of the sheet.”

The “on a copy” part matters — AI advice followed on your only copy is how data gets lost.

9. Standardise dates and numbers stored as text

Prompt: “Some dates in column A are real dates and some are text like ’03/11/2026′. Some amounts in column D have commas and currency symbols and won’t add up. Give me formulas to convert both into clean values in new columns, and explain how I can tell which rows were text.”

Fix errors and understand formulas (prompts 10–12)

10. The error mechanic

Prompt: “This formula returns [#N/A / #VALUE! / #REF!]: [paste formula]. My columns are [describe]. Act like a mechanic: tell me the most likely cause, the exact fix, and one thing to check in my data.”

11. Explain any formula in plain words

Prompt: “Explain this formula like I’m smart but new to spreadsheets. Break it into parts, say what each part does, and tell me what result it gives for the sample row I paste below: [formula] / [sample row]”

This is also the fastest way to learn — and to catch an AI-written formula doing something you didn’t ask for.

12. “Why is my total wrong?”

Prompt: “My total in [cell] looks wrong — it should be about [expected]. Here is the formula and 10 sample rows including the strange ones. List what could make it silently wrong: blanks, text-numbers, duplicates, date boundaries, hidden rows. Check each one.”

Reports and summaries (prompts 13–15)

13. A monthly summary table

Prompt: “Build me a monthly summary: for each month in column A, total amount (D), count of orders, and average order value. Give the formulas and the layout — which cell each goes in — so I can build it once and reuse it.”

14. Turn a sheet into a written summary

Prompt: “Here are the totals from my sheet: [paste the small summary table, not the raw data]. Write a 5-line summary for my manager: what went up, what went down, and the one number that needs attention. No hype, just the facts in the data.”

15. A macro or script, in plain English

Prompt: “Write a [VBA macro for Excel / Google Apps Script] that: loops through all sheets, bolds the header row, freezes the top row, and auto-fits column widths. Skip any sheet named ‘Summary’. Tell me exactly where to paste the code and how to run it.”

Before you trust any AI formula: the 60-second check

  • Test on 5 rows you can verify by hand. If it fails there, it fails everywhere.
  • Probe the edges: a blank cell, a zero, the last day of the month, a duplicate. Silent errors live at the edges.
  • Cross-check the total a second way (a PivotTable, or SUM the parts and compare).
  • Work on a copy until the formula has survived all three checks.

A privacy rule that is not optional

Do not paste private data into a free AI chat: customer names and phone numbers, payroll, bank details, ID numbers. Paste 5–10 rows with names replaced (‘Customer 1′), or describe the columns and invent sample rows. The formula doesn’t care — your customers’ privacy should survive your spreadsheet fix.

Free chat vs dedicated tools: what does each cost?

OptionHow it worksFree tierPaid from
ChatGPT / Claude (chat)Describe or upload; paste the formula back yourselfYes$20/mo (Plus / Pro)
GPTExcelPurpose-built formula generator (also VBA, SQL)4 requests/day~$6.30/mo (annual)
Formula BotFormulas plus chatting with your datasetLimited messages$18/mo
AjelixFormula generator inside a 20+ tool suite10 requests/mo$5.95/mo
Copilot in ExcelInside Excel itself, on your actual fileNo~$20/mo on top of a Microsoft 365 plan

OpenAI has also begun rolling out a native ChatGPT add-in for Excel and Google Sheets, which edits the workbook directly instead of answering in chat — availability varies by account, so check your add-ins store. For most people, the honest answer is boring: the free chat you already have, plus the Master Prompt, beats a paid generator used carelessly. Pay when you hit daily caps or need the tool inside your file all day.

FAQ

Can ChatGPT really write Excel formulas?

Yes — describing the job in plain words and getting back a working formula is one of its most reliable uses. The catch is verification: formulas can be wrong without showing an error, which is why the prompts above ask for edge cases and spot-checks, and why the 60-second check matters.

Do these prompts work in Google Sheets too?

Almost all of them — just say “Google Sheets” in the Master Prompt. Most functions match; a few differ (Sheets uses SPLIT where Excel 365 uses TEXTSPLIT, for example), and the AI will adjust if it knows your platform.

Why does the AI give me formulas my Excel says are invalid?

Usually a version problem: it used a newer function (like XLOOKUP or TEXTSPLIT) that your Excel doesn’t have. Put your exact version in the Master Prompt and ask for a fallback version when one is needed.

Is it safe to upload my whole spreadsheet to an AI?

Treat it like emailing the file to a stranger. Remove or rename private columns first, work on a copy, and for payroll, customer or financial records, share only a small anonymised sample.

How this guide was compiled

The context-first approach reflects what experienced users in the Reddit spreadsheet communities (r/excel, r/googlesheets) converged on after years of “the AI gave me a wrong formula” threads: version + column map + sample rows + edge cases, every time. Example formulas were checked against Excel/Microsoft 365 and Google Sheets function syntax. Tool prices are the vendors’ published list prices as of late October 2026 and change often — confirm on the vendor’s page before paying. No tool paid for placement.

To put these prompts to work, build your own version with our free AI prompt builder, check long prompts with our token counter before pasting them in, and borrow the same plain-language approach from our ChatGPT prompts for small business owners.

Leave a Comment