Excel formulas can feel like a secret language. You know what you want ("add up sales for Delhi only"), but turning that into =SUMIF(...) takes searching, guessing and a lot of #VALUE! errors.
This is where AI for Excel formulas really helps. Free AI chatbots like ChatGPT and Gemini can write a formula from a plain-English description, explain formulas you don't understand, and suggest ways to clean messy data.
This guide is for students, office workers, small business owners and freelancers who use Excel or Google Sheets but are not formula experts. You'll get a prompt template, real examples you can copy, a comparison of free and paid options, and a simple way to test every formula so AI mistakes don't sneak into your work.
Can AI Write Excel Formulas?
Yes. Free AI chatbots like ChatGPT and Gemini can write Excel formulas when you describe your columns and the result you want in plain English. They handle SUMIF, IF, XLOOKUP, date and text formulas well. But AI can make mistakes, so always test the formula on a few rows where you already know the answer.
The trick is not finding a special tool. It is describing your sheet clearly. A vague question gets a vague formula; a precise one usually gets a working formula on the first try.
Free and Paid Options Compared
There are two ways to use AI with spreadsheets:
- Outside the sheet: you describe the problem in a chatbot, then paste the formula into Excel or Sheets. This works for free.
- Inside the sheet: an AI assistant built into the app (Copilot in Excel, Gemini in Google Sheets). This usually needs a paid plan.
| Option | Where it works | Cost (as of October 2026) | Best for |
|---|---|---|---|
| ChatGPT (free plan) | Any browser or app, copy-paste | Free plan with usage limits; see OpenAI pricing | Writing and explaining formulas |
| Gemini app (free) | Any browser or app, copy-paste | Free tier available; see Gemini plans | Writing formulas, Sheets-style syntax |
| Claude or other chatbots | Browser, copy-paste | Free tiers usually available | Long explanations, cleaning logic |
| Copilot in Excel | Inside Excel | Included in some Microsoft 365 consumer plans with AI usage limits | Analysing data inside your workbook |
| Gemini in Google Sheets | Inside Sheets | Needs an eligible Google Workspace or Google AI plan | Summaries, tables and formulas inside Sheets |
Plans and limits change often, so please check the official pages before paying for anything. If you are deciding between ChatGPT plans, our ChatGPT Go vs Plus comparison explains the differences.
Copilot in Excel: who gets it
Microsoft's support page on AI credits and limits for Microsoft 365 subscriptions says, as of October 2026, that "Microsoft 365 Personal, Microsoft 365 Family, Microsoft 365 Premium, and Microsoft 365 Pro plans include AI features," with usage allowances that depend on the plan. Business users get Copilot through work plans set up by their organisation.
If you only use free Excel for the web without a subscription, don't assume Copilot is included. Check inside your own Excel or on Microsoft's page.
Gemini in Google Sheets: who gets it
Google's help page With Gemini in Google Sheets says, as of October 2026, "This feature requires an eligible Google Workspace or Google AI plan." So a basic free Gmail account usually won't see Gemini inside Sheets. You can still use the free Gemini app and paste formulas into Sheets yourself.
The Formula Prompt Template
This template works with any chatbot. Fill in the brackets.
I'm using [Excel 365 / Excel 2016 / Google Sheets]. My data is in [Sheet name], rows [2 to 500]. Column A is [Date], column B is [Region], column C is [Product], column D is [Sales amount]. I want a formula in [cell F2] that [describe the result in plain words]. Please give the formula, explain each part in simple words, and tell me if it won't work in my version.
Why each part matters:
- Your app and version. XLOOKUP and some newer functions don't exist in older Excel versions. Google Sheets has slightly different functions.
- Exact column letters and headers. AI can't see your sheet; it needs a map.
- Where the formula goes. This affects relative and absolute references.
- The result in plain words. Describe the outcome, not the function you think you need.
- Ask for an explanation. You learn faster and can spot errors.
For more on writing good prompts in general, see our guide on how to write prompts for ChatGPT.
Examples: Formulas AI Can Write for You
Each example below shows a plain-English request and the kind of formula a chatbot should return. Test them on your own data before using them.
SUMIF: total sales for one region
Prompt: "Column B has Region, column D has Sales. Give me total sales where Region is 'Delhi'."
Formula: =SUMIF(B:B, "Delhi", D:D)
To make it flexible, put the region name in a cell like H1 and ask the AI to use it: =SUMIF(B:B, H1, D:D).
SUMIFS: total with two conditions
Prompt: "Total sales where Region is Delhi and Product is 'Notebook'."
Formula: =SUMIFS(D:D, B:B, "Delhi", C:C, "Notebook")
Note that SUMIFS puts the sum range first, while SUMIF puts it last. This is a common mix-up, and AI sometimes gets it wrong too.
IF: label high and low sales
Prompt: "In E2, show 'High' if D2 is 10000 or more, otherwise 'Low'."
Formula: =IF(D2>=10000, "High", "Low")
For three levels, ask for a nested IF or IFS:
=IFS(D2>=10000, "High", D2>=5000, "Medium", TRUE, "Low")
IFS works in Excel 2019 and later, Microsoft 365 and Google Sheets.
XLOOKUP and VLOOKUP: find a price from another sheet
Prompt: "Sheet 'Prices' has product names in column A and prices in column B. In my main sheet, C2 has a product name. Return the price, or 'Not found' if missing."
Formula (Excel 365 / 2021): =XLOOKUP(C2, Prices!A:A, Prices!B:B, "Not found")
Formula (older Excel): =IFERROR(VLOOKUP(C2, Prices!A:B, 2, FALSE), "Not found")
Always tell the AI your Excel version, because XLOOKUP doesn't work in Excel 2016 or 2019.
COUNTIF: count how many times something appears
Prompt: "Count how many orders came from Mumbai in column B."
Formula: =COUNTIF(B:B, "Mumbai")
Dates: month, days between, and due dates
- Month name from a date in A2: =TEXT(A2, "mmmm")
- Days between two dates (A2 start, B2 end): =B2-A2
- Date 30 days after A2: =A2+30
- Working days between two dates: =NETWORKDAYS(A2, B2)
If your dates come out as numbers like 46000, format the cell as a date. AI often forgets to mention this.
Text cleanup: names and codes
- Remove extra spaces: =TRIM(A2)
- Proper case ("rAHUL sharma" to "Rahul Sharma"): =PROPER(TRIM(A2))
- Join first and last name: =A2 & " " & B2
- First word only: =LEFT(A2, FIND(" ", A2 & " ") - 1)
- Last 4 digits of a phone number: =RIGHT(A2, 4)
Explain a Formula You Don't Understand
Inherited a spreadsheet full of strange formulas? This is one of the best uses of AI for Excel.
Prompt:
Explain this Excel formula step by step in simple words, like I'm a beginner. Then tell me what could make it return an error: [paste formula]
For example, a chatbot can break down =IFERROR(INDEX(B:B, MATCH(F2, A:A, 0)), "") into:
- MATCH finds the row where F2 appears in column A.
- INDEX returns the value from column B in that row.
- IFERROR shows a blank instead of an error if nothing is found.
You can also ask: "Is there a simpler way to write this in Excel 365?" Often the answer is XLOOKUP.
Data Cleaning with AI
Messy data is where most time gets wasted. AI can suggest formulas and steps, but you should still do the cleaning yourself in the sheet.
Useful prompts:
- "My column A has names with extra spaces and mixed capitals. Give me a formula to clean them."
- "Column B has phone numbers in formats like '+91 98xxxxxx', '098xxxxxx' and '98xxx xxxxx'. Give me steps to make them all 10 digits."
- "How do I find and remove duplicate rows based on columns A and C in Excel?"
- "Column D has amounts stored as text with '₹' and commas. How do I convert them to numbers?"
A typical answer for the last one might be: =VALUE(SUBSTITUTE(SUBSTITUTE(D2, "₹", ""), ",", ""))
A safe cleaning workflow
- Copy the original data to a new sheet before you start.
- Add helper columns with the cleaning formulas.
- Check 10–20 rows by eye.
- Copy the helper column and Paste Special → Values over the original only when you're sure.
Pivot Tables and Charts with AI Help
Most chatbots can't click buttons in your Excel. But they can tell you exactly what to click.
Prompt:
I have sales data with Date, Region, Product and Sales columns. I want to see total sales by Region for each month. Give me step-by-step instructions to build a pivot table in Excel 365, including how to group dates by month.
You'll usually get steps like: select data → Insert → PivotTable → drag Region to Rows, Date to Columns, Sales to Values → right-click a date → Group → Months.
For charts, ask: "Which chart type is best to show monthly sales trends for 4 regions, and how do I create it?" A line chart is usually the answer for trends, and a clustered column chart for comparing regions.
AI for Excel data analysis, free
If your data has no personal or confidential information, some chatbots let you upload a CSV or Excel file and ask questions like "Which region grew the most?" Free plans usually limit uploads or usage, so check each tool's official page. For sensitive data, describe the structure instead of uploading the file (see the privacy section below).
Copilot in Excel and Gemini in Sheets
If you have a plan that includes them, built-in assistants save the copy-paste step.
Copilot in Excel can help analyse data in your workbook, suggest formulas, highlight patterns and create charts. Microsoft lists "Analyze data in Excel" among the AI features on its consumer plans' AI credits page, with usage limits. It works best when your data is formatted as a proper Excel table (Ctrl + T) with clear headers.
Gemini in Google Sheets can help create tables, generate formulas and summarise data, according to Google's help page. It needs an eligible Workspace or Google AI plan.
Tips for both:
- Keep data in a clean table with one header row.
- Ask one question at a time.
- Still check formulas and numbers before sharing results.
If you're a student looking for free options first, our list of free AI tools for students includes more ideas.
Privacy: Don't Paste Sensitive Data
This is the most important rule. When you paste data into a public chatbot, you are sending it to that company's servers.
Never paste:
- Customer names with phone numbers, emails or addresses
- Salary, bank or Aadhaar/PAN details
- Company financials marked confidential
- Health or student records
Instead, describe the structure: "Column A has customer IDs, column B has amounts." Or use fake sample rows that look like your real data.
If your workplace has an approved AI tool (like Copilot under a company Microsoft 365 account), use that and follow your company's policy. Each AI provider explains how it handles data on its privacy pages; check them before uploading files.
Mistakes and How to Test AI Formulas
AI formulas fail in predictable ways. Here's how to catch them.
| Common AI mistake | How to spot it | Fix |
|---|---|---|
| Wrong function for your version | #NAME? error | Tell AI your Excel version and ask again |
| Wrong column letters | Results don't make sense | Re-check your column map in the prompt |
| Argument order mixed up (SUMIF vs SUMIFS) | Totals are zero or wrong | Ask AI to double-check argument order |
| Missing $ signs | Formula breaks when copied down | Ask for absolute references where needed |
| Text vs number problems | Lookups return "Not found" | Use TRIM, VALUE or check data types |
| Google Sheets vs Excel differences | Formula works in one, not the other | Mention which app you use |
A 4-step test for every formula
- Test on known rows. Pick 3–5 rows where you can calculate the answer by hand.
- Test edge cases. Blank cells, zero values, text in a number column.
- Copy it down and check the last few rows too.
- Ask AI to review. Paste the formula back and ask, "What could go wrong with this?"
Practice Sheet
Create a small sheet to practise with these columns and 10–15 rows of made-up data:
| Date | Region | Product | Units | Price | Salesperson |
|---|---|---|---|---|---|
| 01-11-2026 | Delhi | Notebook | 12 | 40 | Riya |
| 02-11-2026 | Mumbai | Pen | 50 | 10 | Arjun |
| 03-11-2026 | Delhi | Pen | 30 | 10 | Arjun |
Then ask AI to help you:
- Add a Sales column (Units × Price).
- Total sales for Delhi using SUMIF.
- Label each sale High or Low with IF.
- Count sales by each salesperson with COUNTIF.
- Show the month name from the date.
- Build a pivot table of sales by region and month.
- Create a column chart of total sales by region.
Working through this once teaches you more than reading ten articles. Excel and data skills also feature in our list of high-income skills without a degree.
Final Thoughts
Using AI for Excel formulas is one of the most practical, everyday uses of AI. You don't need a paid tool to start: free ChatGPT or Gemini can write, explain and fix most formulas if you describe your sheet clearly.
Built-in assistants like Copilot in Excel and Gemini in Sheets are handy if your plan includes them, but they are not required.
Whatever you use, follow two rules: never paste sensitive data into a public chatbot, and always test formulas on rows you can check by hand. Do that, and AI becomes a patient Excel tutor rather than a source of hidden errors.
Key Takeaways
- Free chatbots like ChatGPT and Gemini can write and explain Excel formulas from plain-English descriptions.
- Give AI your app version, column map, target cell and desired result for accurate formulas.
- As of October 2026, Copilot in Excel comes with some Microsoft 365 plans, and Gemini in Sheets needs an eligible Workspace or Google AI plan.
- AI is great for explaining formulas you inherited and suggesting cleaning steps.
- Never paste personal or confidential data into public AI tools; describe the structure instead.
- Test every AI formula on known rows and edge cases before trusting it.
Want more practical AI guides? Read our list of AI tools for beginners, browse AI and software tools, or explore more tutorials on our blog.
Frequently Asked Questions
What is the best free AI for Excel formulas?
Free versions of ChatGPT and Gemini both work well for writing and explaining formulas. The quality depends more on your prompt than the tool. Tell the AI your Excel version, your columns and the result you want.
Can ChatGPT write VLOOKUP and XLOOKUP formulas?
Yes. Describe where your lookup value is, which sheet and columns hold the table, and what to return. Mention your Excel version, because XLOOKUP is not available in older versions like Excel 2016.
Is Copilot in Excel free?
Not for everyone. As of October 2026, Microsoft says AI features are included in Microsoft 365 Personal, Family, Premium and Pro plans, with usage limits. Check Microsoft's official page for your plan before relying on it.
Can I use Gemini in Google Sheets for free?
Google's help page says Gemini in Sheets requires an eligible Google Workspace or Google AI plan. On a basic free account, you can use the free Gemini app to write formulas and paste them into Sheets.
Can AI do data analysis in Excel for free?
Partly. You can ask free chatbots for formulas, pivot table steps and chart ideas. Some free plans also allow file uploads with limits. Avoid uploading files with personal or confidential data.
Why does my AI-generated formula show #NAME?
This usually means the function doesn't exist in your version or a name is misspelled. For example, XLOOKUP and IFS don't work in older Excel. Tell the AI your exact version and ask for an alternative.
Is it safe to paste my spreadsheet into ChatGPT?
Only if it contains no personal, financial or confidential information. For sensitive sheets, describe the column structure or use fake sample data. If your company provides an approved AI tool, use that instead.
Can AI create pivot tables in Excel?
Chatbots can give you step-by-step instructions to build pivot tables. Built-in assistants like Copilot in Excel, where available, can help create summaries directly in the workbook. You still need to check the results.
Does AI work for Excel dashboards?
AI can suggest the layout, the formulas behind each number and suitable chart types. Building the dashboard is still your job, but AI can speed up each step and explain anything you get stuck on.
How do I check if an AI formula is correct?
Test it on a few rows where you know the answer, try blank or unusual values, copy it down the column, and ask the AI what could go wrong. Fix any differences before using the results.