Home › AI at work › Excel formulas

Get AI to write any Excel formula for you

Describe what you want in plain English. The AI writes the formula, tells you where to put it and explains it. If it breaks, it fixes it. You never have to upload your data.

Starter 20 minutes to learn Free · works in Excel or Google Sheets Your data stays in Excel
You ask, in plain English
My sheet has Order Date in column B, Region in D and Total in I. What were total sales for the North region in March?
You only describe the columns. The data itself never leaves Excel.
The AI gives you the formula
=SUMIFS(I:I, D:D, "North", B:B, ">="&DATE(2026,3,1), B:B, "<"&DATE(2026,4,1))
KL
1RegionMarch sales
2North£1,894.17
Plus a plain-English explanation, and a version that reads the region from a dropdown (Step 3).
What you'll be able to do

Every formula you need, without learning them

The trick isn't knowing formulas. It's describing your spreadsheet clearly, and this guide teaches exactly that.

  • Get a working formula for almost anything: totals with conditions, lookups between sheets, dates, text clean-up, ranking, "if this then that"
  • Understand any formula someone else left in a spreadsheet
  • Fix #N/A, #VALUE!, #REF! and other errors in seconds
  • Build formulas that copy down a whole column correctly
  • Keep your company's data out of the AI entirely, because you only describe your columns and never upload the data

Good for: anyone whose job involves spreadsheets but never had Excel training, people who inherited a mysterious spreadsheet, and managers who need numbers without waiting for the data team.

Before you start

What you need

Excel or Google SheetsAny version from the last ten years. The prompts mention Excel, but swap in "Google Sheets" and they work the same.
An AI chat assistantClaude, ChatGPT, Gemini, or Copilot if your work provides it. Free versions are fine.
Something to practise onDownload our free practice spreadsheet of 300 made-up office-supply orders, or use one of your own sheets.
Step by step

Do it in seven steps

  1. Learn the one habit that makes it work

    The AI can't see your spreadsheet. If you ask "how do I total the sales?" it has to guess which columns you mean, so it guesses wrong. Give it three things every time:

    1. Your columns: the letter and the header of each one that matters.
    2. Where the data is: for example "headers in row 1, data in rows 2 to 301".
    3. What you want and where: "In column I, I want..." or "In cell L2, I want...".

    Here's a reusable starter. Fill it in once, save it in a note, and paste it at the start of every formula question:

    Copy this prompt
    I'm using Excel [version, e.g. Microsoft 365 / Excel 2019 / Google Sheets]. I'm not a formula expert, so please explain simply.
    
    My sheet is called "[Sheet name]". Headers are in row 1 and the data is in rows 2 to [last row].
    The columns are:
    A: [header] (e.g. Order ID, text like ORD-1001)
    B: [header] (e.g. Order Date, a date)
    C: [header] ...
    [add the rest]
    
    What I want: [describe it in plain English]
    Where I want it: [cell or column]
    
    Please give me the exact formula to paste in, tell me which cell to put it in, and whether I should copy it down.
    Tip: if you're not sure how to describe a column, copy the header row and 3 or 4 rows of data and paste them in. If the data is real customer or staff information, change the names and numbers first. The AI only needs to see what the data looks like.
  2. Your first formula, a total with conditions

    Using the practice spreadsheet, ask for the total sales for one region in one month. That's the kind of question that normally sends people to Google.

    Copy this prompt
    I'm using Excel (Microsoft 365). My sheet is called "Sales". Headers are in row 1, data in rows 2 to 301.
    A: Order ID
    B: Order Date (a real date)
    C: Customer
    D: Region (North, South, East or West)
    E: Product
    F: Quantity (number)
    G: Unit Price (number)
    H: Sales Rep
    
    First, in column I, I want "Total" = Quantity × Unit Price for each row.
    Then in cell L2, I want the total of column I for the North region in March 2026 only.
    
    Please give me both formulas, tell me where to put each one, and explain the second one in simple words.

    The AI will probably give you =F2*G2 for column I and a SUMIFS formula for L2. Paste them in. To fill column I quickly, double-click the small square at the bottom-right corner of cell I2 and Excel copies the formula all the way down.

    Check it. Filter the Region column to North and look at the March rows. Does the total roughly match? It's a good habit for every new formula.
  3. Make it reusable

    Typing "North" and "March" into a formula means editing it every time. Ask the AI to make it flexible:

    Copy this prompt
    That works. Now I want to type a region in cell K2 and a month in cell K3 (like 01/03/2026), and have L2 update automatically. Please rewrite the formula to use those cells, and suggest a dropdown for K2 so people can only pick North, South, East or West.

    The AI will explain how to add a dropdown with Data Validation. You've just built a mini report that anyone in your team can use.

  4. Look things up from another sheet

    The most-searched Excel problem of all: pulling a value from another table. Say you have a second sheet called "Reps" with each sales rep's team and manager.

    Copy this prompt
    I have two sheets in Excel (Microsoft 365).
    Sheet "Sales": column H is Sales Rep (a full name), data in rows 2 to 301.
    Sheet "Reps": column A is Rep Name, column B is Team, column C is Manager. Data in rows 2 to 9.
    
    In Sales column J, I want each order's Manager, looked up from the Reps sheet using the rep's name. If the name isn't found, show "Not found" instead of an error.
    
    Please give me the formula for J2 and tell me if I should copy it down. If XLOOKUP isn't available in older Excel, give me the VLOOKUP version too.
    Tip: always ask the AI to handle "not found". It saves you from a column full of #N/A.
  5. Fix a formula that's broken

    When a formula gives an error or the wrong number, don't start again. Paste it in with what you see:

    Copy this prompt
    This Excel formula is in cell J2 and shows #N/A for most rows, even though I can see the names in the other sheet:
    
    [paste the formula here]
    
    Column H in "Sales" has names like "Grant, Quinn" but the Reps sheet has "Quinn Grant". What's wrong and how do I fix it? Please give me the corrected formula.

    The AI is very good at spotting the usual causes: extra spaces, names written differently, numbers stored as text, or a range that doesn't go down far enough.

  6. Understand a formula someone else wrote

    Inherited a spreadsheet full of mysterious formulas? Click the cell, copy what's in the formula bar, and ask:

    Copy this prompt
    Please explain this Excel formula in plain English, step by step, as if I've never seen these functions before. Then tell me if there's a simpler way to write it.
    
    [paste the formula here]
  7. Save your best prompts

    Keep a note called "Excel prompts". Each time a formula works, save the prompt you used. In a month you'll have your own library for your own spreadsheets. Most people only ever need five or six.

ADVERTISEMENT · IN-ARTICLE
If it goes wrong

Quick fixes

The formula shows as text instead of a result

The cell is formatted as Text. Change it to General (Home › Number), then click into the cell and press Enter.

The AI used a function my Excel doesn't have

Functions like XLOOKUP, FILTER, UNIQUE and LET need Microsoft 365 or Excel 2021. Tell the AI your version: "I have Excel 2016. Please rewrite this without XLOOKUP or FILTER."

Excel says "There's a problem with this formula"

Check whether your computer uses commas or semicolons between formula parts. Many European versions use ;. Tell the AI: "My Excel uses semicolons as separators. Please rewrite the formula."

The answer is wrong, not an error

Usually the AI misunderstood a column. Repeat what each column holds, give one example row, and say what the right answer should be for that row.

The formula breaks when I copy it down

Ask: "When I copy this formula down, the reference to K2 changes to K3, K4 and so on. How do I lock it?" (The answer is dollar signs, like $K$2.)

Try it on other jobs

Use it on your own work

The same describe-your-columns habit works for almost any spreadsheet task:

Days overdue

"In column F, how many days late is each invoice compared to today? Show 0 if it isn't due yet."

Split full names

"Column B has 'Surname, First name'. Put the first name in C and the surname in D."

Rank the top performers

"Rank each sales rep by total sales and show the top 3 in a separate table."

Working days

"How many working days between the start and end date, excluding bank holidays listed in sheet 'Holidays'?"

Traffic lights

"Show 'On track', 'At risk' or 'Behind' depending on whether actual is above 95%, 80 to 95%, or below 80% of target."

Why this way?

One skill instead of fifty functions

Formula courses teach you 50 functions you'll forget. This teaches you one skill: describing your problem clearly to an AI. It works for every formula you'll ever need, in any spreadsheet, and it keeps your company's data on your computer, because the AI only ever sees your column names.

Keep going

What to build next