Home › Data analysis › Excel formula help: how to do it with AI

Excel formula help: how to do it with AI

Last checked

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).

Best pick

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

  1. Note the exact layout: which column holds what, where the header row is, and the sheet name if you reference another tab.
  2. 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).
  3. Describe the result in words, with one worked example: "for row 5 the answer should be 42 because…"
  4. Paste the formula into one cell, check it against your worked example, then fill down.
  5. Check rows with blanks, zeros and text values; ask for a fix if any show an error.
  6. 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

Write a formula
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 an inherited formula
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]
Fix an error
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

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

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

Related tasks

Report an error on this page