ChatGPT for Excel: Get Formulas From ChatGPT, Copilot and Gemini (With Examples)

ChatGPT for Excel is now two things: OpenAI’s official add-in that works inside Excel and Google Sheets, and the plain trick of asking ChatGPT in a chat window to write a formula you paste into a cell. This guide compares ChatGPT, Copilot in Excel and Gemini in Google Sheets for writing formulas, explaining errors and cleaning data, then gives 10 worked formula examples and a prompt template you can copy.

ChatGPT for Excel: orange and blue 3D bar chart on a white grid

Quick answer: To get Excel formulas from AI, describe your columns and the result you want in plain English, for example “Column B is Region, column C is Sales. Total the sales for West.” Any chat AI (ChatGPT, Copilot, Gemini) will return a formula such as =SUMIFS(C:C,B:B,”West”). For AI that works inside the workbook, install the ChatGPT add-in from Excel’s Add-ins menu or the Google Workspace Marketplace, use Copilot in Excel with an eligible Microsoft 365 plan, or click Ask Gemini in Google Sheets with an eligible Google plan. Always test the formula on a few rows before you trust it.

ChatGPT for Excel, Copilot and Gemini compared

All three can write a formula from a plain-English request. The real differences are where they run, what they cost and whether they can change your sheet for you.

ToolWorks inEdits the sheet itself?Who can use itBest for
ChatGPT (chat window)Any spreadsheet: you copy and pasteNoAnyone, including the free planQuick one-off formulas, learning how a function works
ChatGPT for Excel and Google Sheets (add-in)Excel and Google SheetsYes, after asking youFree, Go, Plus, Pro, Business, Enterprise and Edu plans (usage limits are lower on cheaper plans)Building and fixing whole sheets, explaining a messy workbook
Copilot in ExcelExcel for Microsoft 365 (Windows, Mac, web, iPad) and Excel 2024Yes (adds formula columns and rows)Microsoft 365 Personal, Family and Premium, or a work Copilot licencePeople who already pay for Microsoft 365
Gemini in Google SheetsGoogle SheetsYes (formulas, tables, charts, pivot tables)An eligible Google Workspace or Google AI planGoogle Sheets users with a Gemini plan

Option 1: Ask ChatGPT in a chat window (works everywhere, free)

This is the method most people mean by “ChatGPT for Excel”, and it works with any version of Excel, Google Sheets, LibreOffice or Numbers. You don’t install anything.

  1. Open ChatGPT (the free plan is enough). New to it? Our guide on how to use ChatGPT covers the basics.
  2. Describe your sheet: the column letters, what each column holds, the row where data starts, and which program you use (Excel 365, Excel 2016, Google Sheets).
  3. Say exactly what result you want and in which cell.
  4. Copy the formula into the cell, press Enter, and check the answer against two or three rows you can work out by hand.

The catch: ChatGPT can’t see your file in this method, so it guesses from your description. If the formula returns an error, paste the error and the formula back into the chat and ask it to fix it.

Option 2: The ChatGPT add-in for Excel and Google Sheets

OpenAI launched ChatGPT for Excel as a beta in March 2026, powered by GPT-5.4 Thinking, and added a Google Sheets version in April. In May 2026 it opened up to all plans, including Free and Go, with lower usage limits on the cheaper plans. Unlike the chat window, the add-in reads your workbook, so it can:

  • write formulas from a plain-English request and put them in the right cells
  • build a sheet from scratch, such as a budget tracker or a simple dashboard
  • clean messy data, sort it and reformat results
  • explain a formula or an unexpected result, and point to the cells it used
  • run “what if” scenarios on an existing model

It asks before it changes anything, so you can review each edit.

How to install it

  • Excel: on the Home tab select Add-ins, search for ChatGPT, add it, then open it from the ribbon and sign in with your ChatGPT account.
  • Google Sheets: install ChatGPT from the Google Workspace Marketplace (Extensions > Add-ons > Get add-ons), then open it from the Extensions menu and sign in.

Two things to know: chats in the add-in are kept separately from your normal ChatGPT history and don’t use ChatGPT memory, and support for macros and VBA is still incomplete. OpenAI’s help page ChatGPT for Excel and Google Sheets has the current plan limits.

Option 3: Copilot in Excel

If you pay for Microsoft 365, Copilot is already built into Excel. Microsoft says Copilot is available in Microsoft 365 Personal, Family and Premium subscriptions; work accounts need a Copilot licence from their organisation. Microsoft’s guide to generating formulas with Copilot in Excel gives these steps:

  1. Select the Copilot icon to open the Copilot pane.
  2. Describe the calculation, for example “Add a column that calculates the profit margin for each product.”
  3. Copilot suggests a formula column or row and explains how each formula works. Review it, then insert it.
  4. To understand a formula you already have, ask “Explain the formula in cell D3.”

Microsoft’s tip: name the columns you want Copilot to use, and you get more accurate results. For more on Microsoft’s assistant, see how to use Copilot for free.

Option 4: Gemini in Google Sheets

Google’s assistant lives in Sheets for people with an eligible Google Workspace or Google AI plan. According to Google’s help page Gemini in Google Sheets, it can generate formulas, create tables, build charts and pivot tables, add drop-downs and answer questions about your data.

  1. Open a spreadsheet in Google Sheets on your computer.
  2. At the top right, click Ask Gemini to open the side panel.
  3. Type your request and press Enter.

For a formula in one cell, type = in the cell and press Ctrl + Alt + G (Windows and ChromeOS) or ⌘ + Ctrl + G (Mac). Google says it works best with native Sheets files, so convert an Excel file first with File > Save as Google Sheets.

10 worked examples: prompts and the formulas AI should give you

We checked every formula below in a test spreadsheet with this small sales table (data in rows 2-5):

A: DateB: RegionC: SalesD: Due dateE: CustomerF: Rep
25 Jan 2026West120010 Jan 2026” maria lopez “Ann
320 Jan 2026East8001 Jan 2099JOHN smithBob
43 Feb 2026West120008 Feb 2026priya shahAnn
514 Feb 2026North60001 Jan 2099li weiCara

If you ask an AI the same questions about a similar table, it should give you these formulas or close equivalents.

1. Total sales for one region

Prompt: “Column B is Region and column C is Sales. Give me the total sales for West.”

Formula: =SUMIFS(C:C,B:B,"West") returns 13200 (1200 + 12000).

2. Count rows that match two conditions

Prompt: “Count the West sales over 1000.”

Formula: =COUNTIFS(B:B,"West",C:C,">1000") returns 2.

3. Total for one month

Prompt: “Column A has dates. Total the sales in column C for January 2026.”

Formula: =SUMIFS(C:C,A:A,">="&DATE(2026,1,1),A:A,"<"&DATE(2026,2,1)) returns 2000. This date-range pattern is safer than tricks with MONTH(), which can count blank cells as January.

4. Average for one person

Prompt: “Average sale for the rep named Ann in column F.”

Formula: =AVERAGEIFS(C:C,F:F,"Ann") returns 6600.

5. Percentage change between two numbers

Prompt: “Percentage change from C2 to C3.”

Formula: =(C3-C2)/C2 returns -0.333. Format the cell as a percentage to see -33%.

6. Flag overdue items

Prompt: “Column D is the due date. Show Overdue if the date has passed, otherwise On time.”

Formula: =IF(TODAY()>D2,"Overdue","On time"), filled down. Rows 2 and 4 show Overdue; rows 3 and 5 show On time.

7. Tiered commission

Prompt: “Commission is 10% on sales of 10,000 or more, 5% on 5,000 or more, otherwise nothing.”

Formula: =IFS(C2>=10000,C2*0.1,C2>=5000,C2*0.05,TRUE,0) gives 0 for row 2, 1200 for row 4 and 300 for row 5. IFS needs Excel 2019 or later, or Google Sheets; on older Excel, ask the AI for a nested IF version instead.

8. Clean messy names

Prompt: “The names in column E have extra spaces and mixed capitals. Clean them up.”

Formula: =PROPER(TRIM(E2)) turns ” maria lopez ” into “Maria Lopez”. TRIM removes extra spaces and PROPER capitalises each word.

9. Pull out the first name

Prompt: “Get the first name from the full name in E3.”

Formula: =LEFT(TRIM(E3),FIND(" ",TRIM(E3))-1) returns JOHN. It works in every version of Excel and in Google Sheets. Wrap it in PROPER() if you want “John”.

10. Look up a value and hide #N/A errors

Prompt: “Look up the sales for a region, and show Not found instead of an error.”

Formula: =IFERROR(VLOOKUP("South",B:C,2,FALSE),"Not found") returns Not found, because there is no South row. In Excel 2021, 2024, Microsoft 365 or Google Sheets, AI tools usually suggest the newer XLOOKUP instead, for example =XLOOKUP("South",B:B,C:C,"Not found"), which has a built-in “not found” value.

Copy this prompt template

Vague prompts are the main reason AI formulas fail. Fill in this template and you’ll get a usable formula far more often:

I use [Excel 365 / Excel 2016 / Google Sheets]. My data is on a sheet called [name], with headers in row 1 and data in rows 2 to [last row]. Column A is [what], column B is [what], column C is [what]. In cell [cell], I want [the exact result, with an example of the right answer for one row]. Give me one formula, explain it in one line, and tell me if it needs a newer version of Excel.

Want more ready-made prompts for other jobs? See our 30 best ChatGPT prompts.

How to use AI to fix formula errors

All three tools are good at explaining errors. Paste the formula and the error, and say what you expected. The usual causes:

  • #NAME? A function name is misspelt, or your version of Excel doesn’t have it (XLOOKUP, IFS, FILTER and UNIQUE are missing in older versions).
  • #N/A A lookup didn’t find a match, often because of extra spaces or numbers stored as text. TRIM or VALUE usually fixes it.
  • #VALUE! The formula is doing maths on text, such as a date typed as text.
  • #DIV/0! Dividing by an empty or zero cell. Ask the AI to wrap the formula in IFERROR.
  • #SPILL! A formula that returns several results (FILTER, UNIQUE) is blocked by cells that aren’t empty. Clear the cells below it.
  • Wrong answer, no error. The most dangerous case. Usually the range is wrong (C2:C50 when data runs to row 80), so ask the AI to use whole columns or a table.

Which one should you use?

  • You just need a formula now: ChatGPT in a chat window. Free, works with any spreadsheet.
  • You work in Excel and pay for Microsoft 365: try Copilot first, since you already have it.
  • You live in Google Sheets and have a Gemini plan: Ask Gemini, then fall back to the ChatGPT add-in if you prefer its answers.
  • You want AI to build or tidy a whole workbook: the ChatGPT add-in, Copilot or Gemini, because they can read and edit the sheet.

If you are building a sheet that pulls live data, such as share prices, our guide to tracking a stock portfolio in Google Sheets shows the GOOGLEFINANCE formulas step by step, and an AI assistant can help you adapt them.

Safety tips before you paste data into AI

  • Don’t paste salaries, bank details, customer lists or anything confidential into a chat. Describe the columns instead and use made-up sample rows.
  • Work on a copy of an important workbook when an add-in is allowed to edit it.
  • Check every AI formula against a few rows you can work out by hand. AI tools can return formulas that look right and calculate the wrong thing.
  • At work, check your company’s rules on which AI tools you may use with company files.

FAQ

Is ChatGPT for Excel free?

Asking ChatGPT for formulas in the chat window is free. The ChatGPT add-in for Excel and Google Sheets is also open to free accounts since May 2026, but with lower usage limits than paid plans.

Can ChatGPT read my Excel file?

Yes. You can upload a file in a ChatGPT chat, or use the ChatGPT add-in, which works inside the open workbook. In a plain chat with no file, it only knows what you describe.

Is ChatGPT or Copilot better for Excel?

Both write the common formulas well. Copilot is the easier choice if you already pay for Microsoft 365, because it’s built in. ChatGPT works with any spreadsheet and has a free option, and its add-in also works in Google Sheets.

Can ChatGPT write Excel macros and VBA?

In the chat window, ChatGPT can write VBA code you paste into the Visual Basic editor. Test it on a copy of your file first. OpenAI’s add-in doesn’t fully support macros and VBA yet.

Why does the formula from ChatGPT show #NAME?

Usually the formula uses a function your version doesn’t have, such as XLOOKUP or IFS in Excel 2016. Tell the AI your exact version and ask for a formula that works in it.

Stuck on a gift? Try our free Gift Idea GeneratorIdeas for anyone by age, job, interests and budget, with Amazon.com and Amazon.in linksFind gifts →

Found this useful? Share it with someone who needs it.

Get our free weekly email: new tech guides and tools, no spam.

New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.

One email a week. Unsubscribe anytime. See our privacy policy.

Related Tech Guides

Leave a Reply

Your email address will not be published. Required fields are marked *