Write spreadsheet formulas with AI: describe it, get the formula
You don't need to know function names. Describe your table and the result you want, and a chat assistant writes the formula.
12 minAs of Oct 2026
By the end of this guide
- Get a working formula such as SUMIFS by describing your table and conditions, without knowing any function names.
- Check the formula against a hand count on a small range, and work out any mismatch with the assistant.
- Know what to check first when you see #N/A, #VALUE! or an unexpected zero.
Who this is for
- Anyone who mixes up VLOOKUP, SUMIFS and friends
- People who build report totals by hand every week
- Anyone who has inherited a sheet full of formulas they don't understand
What you need
- Excel or Google Sheets
- Any chat assistant, such as ChatGPT, Claude or Gemini (free versions work)
- The example file to follow along (download it under the table in step 1; optional)
Step by step
Start by describing your table
The assistant can't see your screen, so tell it what's in each column first.
Column names plus two or three sample rows are enough. Replace real names, phone numbers and other personal data with made-up values.
The example sheet used in this guide (rows 2–11 shown) Date Region Sales rep Revenue 2026-09-29 Seoul Kim Hana 310,000 2026-10-01 Seoul Kim Hana 250,000 2026-10-02 Busan Lee Doyun 180,000 2026-10-07 Seoul Park Seojun 300,000 2026-10-13 Daegu Choi Yujin 150,000 2026-10-15 Busan Lee Doyun 220,000 2026-10-24 Seoul Jung Minjae 190,000 2026-10-31 Seoul Park Seojun 240,000 2026-11-02 Seoul Kim Hana 270,000 2026-11-05 Busan Choi Yujin 160,000 Example prompt Here is my spreadsheet layout. Column A: Date (2026-10-01 format) Column B: Region (Seoul, Busan, etc.) Column C: Sales rep Column D: Revenue (number) Data runs from row 2 to row 500.
Say exactly what result you want
"Sum this up" is vague. "I want October revenue for Seoul in cell G2" — with the conditions and the target cell — is far more likely to get the right formula on the first try.
Example prompt Give me a formula for cell G2 that totals revenue for Seoul in October 2026. Use Excel syntax and explain what each part of the formula does.
Example AI reply SUMIFS adds up only the rows that meet every condition you give it. Put this formula in cell G2 — it works the same in Google Sheets.
=SUMIFS(D2:D500, B2:B500, "Seoul", A2:A500, ">="&DATE(2026,10,1), A2:A500, "<"&DATE(2026,11,1))D2:D500- What to add: revenue in column D
B2:B500, "Seoul"- Condition 1: rows where the region in column B is Seoul
A2:A500, ">="&DATE(2026,10,1)- Condition 2: dates in column A on or after 1 October
A2:A500, "<"&DATE(2026,11,1)- Condition 3: before 1 November. Safer than "up to 31 October" when some dates also carry a time.
Check it on a small range first
Don't apply the formula to everything straight away. Try it on ten or so rows you can check by hand.
If the answer is off, tell the assistant both the value you expected and the value you got — it can usually find the cause.
Rows in the example sheet that are both Seoul and October Date Region Sales rep Revenue 2026-10-01 Seoul Kim Hana 250,000 2026-10-07 Seoul Park Seojun 300,000 2026-10-24 Seoul Jung Minjae 190,000 2026-10-31 Seoul Park Seojun 240,000 Total 980,000 Example prompt I tried the formula on rows 2–11 and got 1,250,000. Calculating by hand, it should be 980,000. What's wrong?
Example AI reply The difference is exactly 270,000. Among rows 2–11, find the Seoul row with 270,000 in revenue and check its date. If it falls outside October, one of the date conditions is missing.
Make sure the formula includes A2:A11, "<"&DATE(2026,11,1). Without that end-date condition, November sales get added too.
Check it
- By hand, the total is 980,000. Shrink the formula's ranges to rows 2–11 (D2:D11, B2:B11, A2:A11) and check you get the same number.
- Rows 2 (29 Sept) and 10 (2 Nov) are Seoul too, but not October, so they must be left out. Keeping rows just outside the date range in your sample makes the date conditions easy to check.
Paste error messages exactly
If you see #N/A, #VALUE! or another error, paste the error and the exact formula you used. Often the cause is the data itself — dates stored as text are a classic.
Common errors and what to check first You see What it means Check first #N/A The lookup value isn't in the list (VLOOKUP, XLOOKUP and so on) Extra spaces or a format mismatch between the value and the list #VALUE! Text where a number should be Numbers that are really text — they usually sit on the left of the cell #NAME? Excel doesn't recognise a name in the formula Function spelling, and the quotes around text conditions like "Seoul" 0, no error No row matched every condition Dates stored as text, or stray spaces in region names Example prompt My SUMIFS formula in G2 shows no error but returns 0. Formula: =SUMIFS(D2:D500, B2:B500, "Seoul", A2:A500, ">="&DATE(2026,10,1), A2:A500, "<"&DATE(2026,11,1)) The dates in column A look like 2026-10-01 but sit on the left of the cell. What's wrong?
Example AI reply The dates in column A are most likely stored as text. Excel stores real dates as numbers and aligns them to the right, so dates sitting on the left are usually text.
Type =ISNUMBER(A2) in an empty cell. If it says FALSE, it's text. Select column A and choose Data → Text to Columns → Finish to turn the text into dates, and the formula will calculate properly.
If your dates look different from 2026-10-01, step through to the wizard's last page instead of clicking Finish, and pick the date order (such as YMD) under column data format.
Common mistakes
- Pointing at things the assistant can't see, like "this column" or "over there"
- Pasting real customer data or confidential company figures
- Applying a formula to the whole sheet without checking a small sample first
References
- SUMIFS function — Microsoft Support
- SUMIFS function — Google Docs Editors Help
- How to correct a #N/A error — Microsoft Support
- Convert dates stored as text to dates — Microsoft Support