
Photo credit: Pexels
By Kashan Ajmeri | Last updated: 29 October 2026
Most people do not ask ChatGPT for an Excel formula because they love spreadsheets. They ask because they are staring at a column of numbers, the deadline is today, and the formula they half-remember keeps returning an error. I have been there with client price lists: one wrong total, and a quote goes out twenty pounds too cheap. Used well, ChatGPT is a fast way to get the formula you need. Used blindly, it is a fast way to get a confident-looking wrong answer into a sheet nobody checks.
How do I use ChatGPT to write Excel formulas?
Describe your sheet in plain words — the columns, a sample cell, and the exact result you want — then ask ChatGPT for one formula plus a one-sentence explanation of what each part does. Paste it into Excel, test it on two or three rows you can check by hand, and only then fill it down the whole column. Never paste a formula you have not tested into a live price list, payroll sheet, or report.
That short answer hides the part that matters. ChatGPT does not see your spreadsheet unless you upload it, and even then it cannot see the row you meant when you wrote "the total column". The quality of the formula depends almost entirely on how precisely you describe the layout. A vague prompt gets a generic formula. A prompt with cell letters, a real example, and the exact output gets something you can actually use.
Why people reach for ChatGPT instead of learning formulas
Excel is everywhere, and most of us were never properly taught it. ChatGPT passed 800 million weekly active users in October 2025, according to OpenAI figures reported that month, and a large share of that use is practical work: writing, coding, and everyday office tasks rather than conversation for its own sake. An NBER working paper analysing a sample of about 1.1 million ChatGPT conversations, published with researchers from Duke and Harvard, found about 40% of messages were "Doing" — asking ChatGPT to produce an output or complete a task, mostly writing. (Computer programming was only 4.2% of messages.) Formula help sits squarely in that group. People ask in the middle of a task, not as homework.
There is a second reason, and it is less comfortable. Spreadsheets are easy to get wrong and hard to notice getting wrong. A 2008 analysis of multiple studies, summarised by University of Hawaii professor Ray Panko, suggested close to 90% of spreadsheet documents contain errors, and that even carefully built spreadsheets contain errors in 1% or more of formula cells. Panko's wider review of audit studies found errors in roughly 94% of operational spreadsheets examined. That is not a reason to distrust every sheet. It is a reason to test every formula, whether a person or an AI wrote it.
Write the prompt ChatGPT can actually answer
Before you open ChatGPT, look at your sheet and note four things: which app and version you use (Excel for Microsoft 365, older Excel, or Google Sheets), the exact column letters, one real example row, and what the answer should be for that row. Then use a prompt built like this one. Copy it, fill in the brackets, and send it as it is:
Write one Excel formula for cell D2. I am using Excel for Microsoft 365. Column A has product names, column B has units sold, column C has unit price. Row 2 is: Ceramic mug, 12, 14.50. I want D2 to show units sold times unit price, which should be 174.00. Give me only the formula, then one sentence explaining each part. Do not invent function names.
Three details in that prompt do real work. Naming the version stops ChatGPT suggesting a function your Excel does not have. Giving the expected answer (174.00) lets you spot a wrong formula in seconds. And "do not invent function names" matters, because chatbots sometimes do exactly that — a plausible-sounding function that Excel has never heard of, delivered with total confidence.
For a second formula, keep the same structure and change only the job. This one asks for a stock label, a task small-shop owners ask for constantly:
Write one Excel formula for cell C2. Column A has product names, column B has stock quantity. If B2 is 0, C2 should say "Out of Stock". If B2 is 1 to 10, it should say "Low Stock". If B2 is more than 10, it should say "In Stock". Give me only the formula and one sentence explaining it.
The answer should be =IF(B2=0, "Out of Stock", IF(B2<=10, "Low Stock", "In Stock")). Read it from the inside out: the first test catches zero, the second catches 1 to 10, and anything left over must be more than 10. If ChatGPT returns something longer, ask it to simplify before you use it. Shorter formulas are easier to check, and easier to fix when they break.
A worked example you can check by hand
Here is a small shop sheet, the kind a market-stall owner or Etsy seller might keep. The prompt above was written for exactly this layout. Check the arithmetic yourself before you trust any tool with it:
| Product (A) | Units sold (B) | Unit price (C) | Total (D) — formula =B2*C2 |
|---|---|---|---|
| Ceramic mug | 12 | $14.50 | $174.00 |
| Soy candle | 8 | $22.00 | $176.00 |
| Canvas tote | 20 | $18.00 | $360.00 |
| Total sales | $710.00 |
The total row uses =SUM(D2:D4), which adds 174.00 + 176.00 + 360.00 = 710.00. That is the whole test: if the formula in D2 gives you anything other than 174.00 for the mug row, the formula is wrong, however tidy it looks. A worked example like this — real numbers, one row you can do on a calculator — is worth more than ten generic prompt templates, because it turns "ChatGPT said so" into "I checked it".
Now try the same check on a percentage change, the formula people get wrong most often. Last month's sales were $4,200 and this month's are $4,830. The prompt: "Give me an Excel formula for cell C2 that calculates the percent change between last month's sales in A2 (4200) and this month's sales in B2 (4830). The answer should be 15%." The formula is =(B2-A2)/A2, and (4830 − 4200) ÷ 4200 = 0.15, which Excel shows as 15% when the cell is formatted as a percentage. If ChatGPT gives you =B2/A2-1, that is the same maths written differently — fine. If it gives you something with a hard-coded 4830 in it, send it back: a formula with the numbers typed in will not update when next month's figures arrive.
ChatGPT vs Excel's built-in help vs Google Sheets AI: what actually differs
| Option | Best for | Watch out for |
|---|---|---|
| ChatGPT (chat prompt) | One-off formulas explained in plain English; learning what a function does | Can invent functions; cannot see your sheet unless you upload it; check every result |
| Excel Copilot / built-in help | Working inside the sheet with your real data in front of you | Paid plans; still needs a clear description of the job |
| Google Sheets + Gemini | Sheets users; quick formula help in the sidebar | Some Excel functions differ or do not exist in Sheets — test before copying across |
| Excel's own formula help (F1 / Insert Function) | Confirming a function exists and what its arguments are | Slow when you do not know the function name to look up |
My honest preference, after using all four on real client sheets: start with ChatGPT for the draft and the explanation, then confirm the function name in Excel's own Insert Function dialog before you trust it. That two-minute detour has caught more invented functions for me than any amount of re-prompting. ChatGPT is the tutor. Excel is the referee.
Five mistakes that make AI-written formulas fail
1. Copying across apps. A formula written for Excel may use XLOOKUP or TEXTSPLIT, which older Excel versions and Google Sheets handle differently or not at all. Always say which app you use in the prompt, and test in that app.
2. Commas vs semicolons. In some European language settings, Excel expects semicolons between function arguments, not commas. If a pasted formula throws an error immediately, try swapping the separators before blaming the formula.
3. Pasting private data. Do not paste customer names, salaries, or bank details into a chatbot to get a formula. Describe the layout with one made-up example row instead, as in the prompts above. The formula does not need your real data to be written correctly.
4. Filling down before testing. A wrong formula copied down 2,000 rows is 2,000 wrong answers. Test three rows by hand first. It takes a minute, and it is the single habit that separates people who trust their sheets from people who discover the error in front of a client.
5. Asking for the answer instead of the formula. "What were my total sales?" invites ChatGPT to guess from data it cannot see. "Write a formula that sums column D" gives you something verifiable. Ask for the tool, not the conclusion.
When should you not use ChatGPT for a formula?
Skip it when the sheet decides money, safety, or legal compliance — payroll calculations, tax figures, medical dosing sheets — unless a second person checks the result independently. That is not anti-AI caution. It is the same rule good spreadsheet practice has always had: Panko's research found that inspection by a second person catches far more errors than one person checking their own work. For a payroll sheet, the check is the work. For a one-off stock count, ChatGPT plus your own three-row test is plenty.
There is also a simpler test. If you cannot explain, in one sentence, what the formula is supposed to do, you are not ready to paste it. Write the sentence first. Then ask ChatGPT to write the formula that does exactly that. The sentence is the specification; without it, you are asking the chatbot to guess your business.
FAQ
Can ChatGPT write Excel formulas for free? Yes. The free ChatGPT plan can write and explain formulas from a text description. You do not need a paid plan, an add-in, or a file upload for ordinary formulas.
Why does ChatGPT sometimes give me a formula that does not work? Usually one of three reasons: the function does not exist in your Excel version, the argument separators differ in your language settings, or the prompt did not describe the sheet layout precisely enough. Ask it to explain each part, and confirm the function name in Excel.
Is it safe to upload my spreadsheet to ChatGPT? Avoid uploading sheets with personal, financial, or customer data. For most formula questions you do not need to upload anything — a description with one example row is enough, and safer.
Does this work in Google Sheets too? Mostly, yes, but say "Google Sheets" in the prompt. Some functions differ between Excel and Sheets, so test the formula in Sheets itself before relying on it.
Can ChatGPT explain a formula someone else wrote? Yes, and this is one of its best uses. Paste the formula and ask: "Explain this formula line by line, and tell me what breaks if column B is empty." You will often find the bug faster than by staring at the cell.
Conclusion
ChatGPT writes Excel formulas well when you treat it like a junior colleague: give it a precise brief, a real example, and the answer you expect, then check its work before it goes anywhere near a real sheet. The prompt template in this guide — app and version, column letters, one example row, expected result, "only the formula plus one sentence" — will handle most everyday formulas, from simple totals to stock labels and percentage changes. The habit that protects you is not a better prompt. It is the three-row hand check, every time. Do that, and the chatbot becomes what it should be: a faster way to get a formula you understand, not a shortcut around understanding it.
The same check-first habit applies to a business plan: verify every figure before it reaches a lender.
The same check-first habit works beyond formulas — see how to plan a weekly meal plan on a budget, where a hand-checked $80 total keeps the chatbot honest.
The same check-first habit applies when you write a complaint letter to a company with AI: verify every date, amount and law before you send it.
Related reading: How to Use AI for Bookkeeping in a Small Business · Best AI Invoice Generator Tools for Freelancers · How to Use AI for Inventory Management in a Retail Store · How to Earn Money on Fiverr With AI Tools
Sources: OpenAI weekly-user figures reported October 2025 (800 million weekly active users); NBER Working Paper 34255, "How People Are Using ChatGPT" (OpenAI / Duke / Harvard, September 2025); Ray Panko spreadsheet-error research, summarised in PlanGuru, "88% of spreadsheets have errors" and Planning Planet, "Spreadsheet error is normal". Formula examples in this article were checked by hand against the worked example above.