Skip to content

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.

BeginnerOffice workersMarketers

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.
Illustration of a chat bubble beside a spreadsheet with matching rows highlighted and a checked total cell
Illustration: AI Ping

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

  1. 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)
    DateRegionSales repRevenue
    2026-09-29SeoulKim Hana310,000
    2026-10-01SeoulKim Hana250,000
    2026-10-02BusanLee Doyun180,000
    2026-10-07SeoulPark Seojun300,000
    2026-10-13DaeguChoi Yujin150,000
    2026-10-15BusanLee Doyun220,000
    2026-10-24SeoulJung Minjae190,000
    2026-10-31SeoulPark Seojun240,000
    2026-11-02SeoulKim Hana270,000
    2026-11-05BusanChoi Yujin160,000

    Download the example (CSV)

    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.
  2. 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.
  3. 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
    DateRegionSales repRevenue
    2026-10-01SeoulKim Hana250,000
    2026-10-07SeoulPark Seojun300,000
    2026-10-24SeoulJung Minjae190,000
    2026-10-31SeoulPark Seojun240,000
    Total980,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.
  4. 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 seeWhat it meansCheck first
    #N/AThe 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 beNumbers that are really text — they usually sit on the left of the cell
    #NAME?Excel doesn't recognise a name in the formulaFunction spelling, and the quotes around text conditions like "Seoul"
    0, no errorNo row matched every conditionDates 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

Keep learning

  • How-to guide10 min

    Five principles for better prompts

    Role, context, task, format and an example — five things that noticeably change what AI gives back.

    BeginnerBeginnersOffice workersMarketers
  • How-to guide12 min

    Let AI do the totals instead of a pivot table

    You don't need to know the PivotTable menus: describe the rows, columns and values, and the assistant writes the formula. The numbers come from the sheet or from code, never from the chat, and you check them against the source.

    PracticalOffice workersMarketers
  • How-to guide14 min

    Image prompt basics for designers

    Just ordering your prompt as subject, style, composition and light makes a difference. Here's how to write prompts that multiply your concepts fast.

    BeginnerDesignersMarketers