- Home
- Artificial Intelligence
- Use AI for Spreadsheets: Excel & Google Sheets Formulas
Use AI for Spreadsheets: Excel & Google Sheets Formulas
There’s a particular kind of afternoon that ends with you staring at a nested IF that has seven brackets and returns #VALUE! for reasons nobody will ever explain. Spreadsheets are where a lot of real work lives, and formula syntax is exactly the sort of fiddly, rule-bound language that chatbots handle well. If you’ve been hand-writing lookups from memory, using AI for spreadsheets is probably the most immediate time-saver you can add to your week.
It isn’t magic, though. An AI-written formula can be elegant, plausible and quietly wrong, and in a spreadsheet wrong numbers travel far before anyone notices. Here’s how we’d use it in Excel and Google Sheets: what to ask for, how to ask, how to check, and where the built-in assistants earn their keep. If you’re still getting comfortable with chatbots in general, our guide to writing effective prompts and the best AI tools roundup are good first stops.
What AI is genuinely good at in a spreadsheet
Start with the unglamorous wins, because they’re the ones you’ll use daily. Writing a formula from a description is the headline act: “In column D I have order dates, in column F the amount; I want total sales for October 2026” becomes a SUMIFS with the right date boundaries in about four seconds. Equally useful is the reverse. Paste an inherited formula that nobody dares touch and ask the model to explain it step by step; you’ll usually come away understanding what your predecessor was trying to do, and sometimes spotting why it breaks when someone adds a row.
Debugging is the third big one. Paste the formula, the error you’re getting and a couple of sample cells, and a good chatbot will often point straight at the culprit: a range that isn’t locked with dollar signs, a number stored as text, a lookup that needs exact match. These are the mistakes that eat an hour when you hunt for them alone and a minute when someone else squints at them.
Then there’s cleanup, which is quietly where the biggest hours disappear. Splitting “Rossi, Marco” into two columns, normalizing phone numbers, converting “3rd March 2026” and “03/03/26” into proper dates, removing duplicates that differ by a trailing space: describe the mess, paste three real examples, and ask for a formula or a short sequence of steps.
How to write a prompt that returns a formula you can use
The single biggest upgrade is context. Compare “formula to find the price” with this: “I’m using Google Sheets. Sheet ‘Orders’ has product IDs in column A and quantities in column B. Sheet ‘Prices’ has product IDs in column A and unit prices in column C. In Orders column D I want quantity times unit price, and a blank if the product ID isn’t found. Give me the formula for row 2 and explain it in one sentence.”
That prompt names the app, the sheets, the exact columns, the output and the edge case. The model doesn’t have to guess, so it doesn’t. Pasting two or three rows of real (or realistic) data helps even more, because it exposes the quirks before they bite. Ask for the formula for a single row, not a giant array, so you can read it. And if the answer is a monster, say so: “simplify this, I’d rather have two helper columns than one unreadable formula.” Readable beats clever, particularly when someone else will open the file next year.
| What you want | Plain-language prompt | Typical result |
|---|---|---|
| Total with conditions | “Sum column F where column B is ‘North’ and the date in D is in October 2026” | SUMIFS with date boundaries |
| Lookup | “Find the price for the ID in A2 from the Prices sheet, blank if missing” | XLOOKUP or VLOOKUP/IFERROR |
| Clean text | “Remove extra spaces and capitalize each name in column A” | TRIM and PROPER combo |
| Split a column | “Separate ‘City, Country’ into two columns” | TEXTSPLIT, SPLIT or LEFT/FIND |
| Fix dates | “Convert these mixed date strings into real dates” | DATEVALUE plus cleanup steps |
| Explain a formula | “Explain this formula step by step and say what could break it” | A readable walkthrough |
The checking habit that saves you
Here’s our firm rule: never trust a formula you haven’t seen produce a right answer somewhere you can verify. Pick three rows, calculate the expected result yourself, and compare. Include an awkward row on purpose, with a blank cell, a zero, a product that isn’t in the lookup table, so you can see how the formula behaves at the edges. Spreadsheet errors that return a confident number are far more dangerous than ones that shout #N/A.
A second habit is to ask the AI to attack its own answer: “What inputs would make this formula return a wrong result without showing an error?” It’s a surprisingly productive question. The model will often list the blank-cell, the text-as-number and the duplicate-key cases, which gives you a checklist for your own data. This ties into a broader caution we’ve written about: chatbots can state wrong things fluently, which we explain in why AI makes things up. In a spreadsheet, the equivalent is a function that doesn’t exist or an argument order that looks right and isn’t. If a formula errors on first paste, that’s often a sign the model invented a function, or used one your version of Excel doesn’t have.
Built-in assistants vs. a chatbot in another tab
Both Microsoft and Google now put an assistant directly inside their spreadsheets: Copilot in Excel on supported Microsoft 365 plans, and Gemini in Google Sheets on supported Google Workspace and Google AI plans. What they can do, and what they cost, shifts regularly, so check the current plan details rather than trusting a blog post, ours included. The appeal is real: the assistant can see your actual table, suggest a formula in place, build a chart or summarize a range without any copy-paste, which also reduces the “pasted the wrong thing” mistakes.
The trade-offs are cost, availability and trust. Built-in tools can be locked behind paid tiers or specific account types, and they’re not always better at the hard reasoning than a general chatbot. Our practical split is this: if you build or edit spreadsheets for a living, the integrated assistant is worth trialing because the context is automatic. If you touch spreadsheets occasionally, a free chatbot plus the paste-a-few-rows habit gets you most of the value at zero cost. If you can’t decide which chatbot, our comparison of ChatGPT vs Claude vs Gemini covers the differences.
These are our editorial impressions of where AI helps with spreadsheet work, not benchmark results; we haven’t run a controlled test.
Pivot tables, charts and the “just tell me what the data says” trap
Asking an assistant to summarize a table or draft a pivot is useful for exploration, as long as you remember it’s a first pass. If you ask “what are the trends in this sheet,” the model may talk confidently about patterns that are really just a few big rows or a data-entry error. Ask it to show the calculation behind each claim, then spot-check the biggest one. We like using AI to propose which pivot or chart to build (“which breakdown would show whether returns are concentrated in one product line?”) and then building it ourselves, since the pivot is where you learn what’s actually in the data.
This is also where good data hygiene pays off. AI can’t compensate for a sheet where the same customer appears under three spellings. A short cleaning pass first, with AI helping, makes every later question more reliable.
Macros, VBA and Apps Script
If formulas aren’t enough, AI can draft a macro. Describe the repetitive task, “for every sheet in this workbook, copy the totals row to a summary tab,” and ask for VBA for Excel or Apps Script for Google Sheets. It’s often a decent starting point and sometimes needs two or three rounds to run cleanly. The risk is higher than with formulas because a script can overwrite or delete data. Work on a copy, read the code at least well enough to know what it touches, and ask the model to add comments explaining each block. If you find yourself doing this a lot, our overview of AI coding assistants is worth a read.
A routine we’d actually follow
Open with the structure: tell the AI the app, the columns and the goal. Ask for the formula for one row plus a one-sentence explanation. Test on three rows including an awkward one. Ask what could make it silently wrong. Then fill down, and spot-check the totals against something independent, like a figure you already trust from another report. When the result matters, such as invoices, budgets or anything going to a client, add a simple control: a cell that reconciles your total against the source. It takes a minute and catches nearly everything.
If you want to go deeper on the non-AI skills, a good Excel formulas book is still a smart investment: the more you understand the logic, the better your prompts get and the faster you notice a wrong answer. And if you also drown in documents, our guide to summarizing PDFs and meetings with AI covers the other half of office work.
What to keep in mind
- Name the app, the columns and the edge cases in your prompt; context is the whole game.
- Ask for one-row formulas with a short explanation, and keep them readable.
- Test on rows you can verify by hand, including an awkward one, before filling down.
- Anonymize data before pasting it, and run any macro on a copy of the file.
AI won’t make you a spreadsheet wizard overnight, and it won’t spare you from understanding your own data. What it will do is shrink the syntax tax: the minutes lost to brackets, argument order and half-remembered function names. Spend the time you save on the part no assistant can do for you, which is deciding whether the number on the screen makes sense.
This page contains affiliate links: if you buy through them we may earn a commission at no extra cost to you.
Need to build a deck? See our guide to the best AI presentation makers for slides.