AI at Work

AI for Spreadsheets: Formulas, Cleanup and Analysis

How to use AI with Excel and Google Sheets: writing and explaining formulas, cleaning messy data, summarising tables and checking results, with prompts to copy.

A laptop showing a colourful spreadsheet chart next to a notebook and coffee
Illustration: AIEmulate / AI-generated.

Key takeaways

  • AI is excellent at writing and explaining formulas; describe your columns and the result you want.
  • Use it to plan data cleanup, but check every transformation on a copy of the data.
  • Never paste sensitive data into a tool without approval; use sample data instead.
On this page

Spreadsheets are one of the places AI saves the most time. Instead of searching forums for the right formula, you can describe what you want in plain English and get a working answer, plus an explanation.

1. Write formulas from plain English

Describe your layout precisely:

“Column A has order dates, column B has customer names, column C has order totals. Write a formula for cell F2 that sums column C for the customer named in E2, only for orders in 2026.”

Good prompts name the columns, the sheet, the spreadsheet software and the exact result you want.

2. Explain formulas you inherited

Paste a complicated formula and ask: “Explain this step by step, and tell me what could go wrong.” It’s one of the fastest ways to understand someone else’s workbook.

3. Clean messy data

AI can suggest steps to:

  • Split names into first and last name
  • Standardise dates and phone numbers
  • Remove duplicates and extra spaces
  • Categorise free-text entries

Ask for formulas or step-by-step instructions, apply them to a copy of your data and spot-check the results.

4. Summarise and analyse

Ask for summaries, trends or pivot table suggestions: “Which categories grew most month over month?” Built-in assistants in spreadsheet apps can work directly with your data; general chat assistants can work with a sample or anonymised extract.

5. Build templates

Budgets, trackers, schedules: describe what you need and ask for the column structure, formulas and conditional formatting rules.

Prompts to copy

  • “Write an [Excel/Google Sheets] formula that [goal]. Data: [describe columns]. Put the result in [cell].”
  • “Explain this formula step by step: [formula].”
  • “Give me steps to clean this data: [sample rows]. I want [format].”
  • “Suggest three charts that best show [question] from these columns: [columns].”

Always check the results

AI can produce formulas that look right but mishandle edge cases: blank cells, text in number columns, date formats. Test on a few rows where you know the answer. For more on writing clear instructions, see our prompt engineering guide.

Protect your data

Don’t paste customer lists, financials or personal data into tools your organisation hasn’t approved. Use made-up sample rows to get the formula, then apply it yourself. For sensitive documents, see summarising PDFs with AI safely.

Frequently asked questions

Can AI write Excel formulas?

Yes. Describe your data and desired result clearly and it can write and explain formulas, including lookups, conditions and array formulas.

Is it safe to upload spreadsheets to AI tools?

Only if your organisation allows it and the data isn’t sensitive. Our AI privacy settings guide explains what to switch off. When in doubt, use anonymised samples.

Which AI is best for spreadsheets?

Built-in assistants in your spreadsheet app are convenient; general assistants are great for formulas and explanations. Test with your own tasks.

Sources

  1. Microsoft — Copilot in Excel
  2. Google — Gemini in Sheets

Every article is edited by a human and checked against our editorial policy. Spotted a mistake? Tell us.

Keep reading