Home › Data analysis › Excel formula help: how to do it with AI
Excel formula help: how to do it with AI
From official vendor pages; selected tasks also include dated logged-out free-plan trials. Report an error.
Beginner Risk: Low 📊 Data analysis
Tell an assistant what you want a cell to calculate and it writes the Excel or Google Sheets formula, or explains a formula someone else left behind. It works best when you describe your columns exactly and test the result on a few rows you can check by hand.
Who it’s for: Office workers, small business owners, students and anyone who inherited a spreadsheet full of formulas they didn't write.
Why low risk: A formula can work on your test rows and break on blanks, text-formatted numbers or a different locale (comma vs semicolon separators).
ChatGPT has the highest score on our published rubric (94/100) of the 4 tools listed for this task. Lists spreadsheet creation and data analysis. Its free plan includes limited data analysis (verified on its pricing page).
Step by step
- Note the exact layout: which column holds what, where the header row is, and the sheet name if you reference another tab.
- Say whether you use Excel or Google Sheets, and your version if it's older Excel (some functions such as XLOOKUP aren't in older versions).
- Describe the result in words, with one worked example: "for row 5 the answer should be 42 because…"
- Paste the formula into one cell, check it against your worked example, then fill down.
- Check rows with blanks, zeros and text values; ask for a fix if any show an error.
- Keep a note next to complex formulas explaining what they do.
AI prompts to write an Excel formula
Replace the [brackets] with your details. See all prompt examples
In [Excel / Google Sheets], column A has [what], column B has [what], headers in row 1. In column C I want [result]. Example: for row 2 the answer should be [value] because [reason]. Give the formula for C2 and explain it.
Explain this formula step by step in plain English, as if to a beginner, and tell me what happens if a cell it uses is blank: [paste formula]
This formula shows [#N/A / #VALUE! / wrong number] in row [N]. Here is the formula and what's in the cells it uses: [details]. Explain why and give a corrected version.
Illustrative example
You paste
Ask: Column A has order dates, column B has amounts. In D2 I want the total for March 2026.
A good answer looks like
Answer: =SUMIFS(B:B, A:A, ">="&DATE(2026,3,1), A:A, "<"&DATE(2026,4,1)) It adds amounts in B where the date in A is on or after 1 March and before 1 April. If your dates are stored as text, convert them first or the total will be 0.
Illustrative example written for this guide, not output captured from a specific tool.
Which tool to pick, and why
- Microsoft Copilot: With a Microsoft 365 Copilot plan it works inside Excel, so your data stays in the workbook you already use. Visit official website ↗
- Google Gemini: Its Google Workspace integration fits budgets kept in Google Sheets, and its free plan is verified for files. Free plan can do this Visit official website ↗
- ChatGPT (incl. Work & Codex): Lists spreadsheet creation and data analysis. Its free plan includes limited data analysis (verified on its pricing page). Free plan can do this Visit official website ↗
- Claude (incl. Claude Code): Free plan verified for files and code execution, so it can build and check a sheet from a CSV. Free plan can do this Visit official website ↗
Reasons come from the capabilities, free-plan details and prices we've checked on official pages (separate from any dated trial above). Sources: www.microsoft.com/en-us/microsoft-copilot/for-individuals · gemini.google/subscriptions/ · chatgpt.com/pricing · claude.com/pricing
Common mistakes
- Describing columns vaguely ("the sales column") instead of by letter.
- Not saying Excel or Google Sheets.
- Filling a formula down without checking blanks and text values.
- Pasting a whole sheet of customer data when the headers and two fake rows would do.
Privacy tip
Formulas don't need real data. Share column headers and one or two made-up rows instead of customer names, salaries or account numbers.
Microsoft Copilot setting · Google Gemini setting · ChatGPT (incl. Work & Codex) setting · Sources: support.microsoft.com/en-us/privacy/microsoft-copilot/privacy-controls · support.google.com/gemini/answer/13594961 · help.openai.com/en/articles/7730893-data-controls-in-chatgpt
See also
- Write an Excel macro or Apps Script: automate repeated steps with a macro