Store › Blog › Guides

How do you use ChatGPT to write Excel formulas without errors?

By IA Business Lab · Updated 2026-11-21

Describe your sheet structure (columns and sample data, with no confidential information), the result you want and your Excel version. Ask for the formula with an explanation, test it in one cell with known cases and check edge cases such as blank cells or text. Never apply it to the whole dataset without reviewing it.

The recipe for a good request

  1. Context: which columns you have and what they hold (A: date, B: customer, C: amount).
  2. Goal: what you want to calculate, with an example of the expected result.
  3. Excel version: some functions exist only in recent versions.
  4. Constraints: what to do with blank cells, errors or duplicates.

Example request

I have a table with date in A, customer in B and amount in C. In F2 I want the sum of amounts for the customer I type in E2, only for October 2026. I use Excel 365. Give me the formula and explain each part.

A reasonable answer might use SUMIFS with date ranges, something like =SUMIFS(C:C, B:B, E2, A:A, ">="&DATE(2026,10,1), A:A, "<"&DATE(2026,11,1)). Check that it matches a manual calculation on a few rows.

How to verify the formula

  • Test it with a case whose result you already know.
  • Check blank cells, text where numbers should be and dates stored as text.
  • Use Excel's "Evaluate Formula" to see each step.
  • Compare with a total computed another way.

Common mistakes

  • Pasting confidential data (customers, salaries) into the tool.
  • Applying the formula to all the data without a copy.
  • Not stating your Excel version.
  • Accepting badly closed ranges or wrong absolute references.

What to do when it fails

Copy the exact error message and the formula and ask it to explain the cause. The most common errors are shifted references, mismatched data types and different argument separators depending on regional settings (comma or semicolon).

Frequently asked questions

Can ChatGPT get formulas wrong?

Yes. Always test the result with known cases.

What do I do with sensitive data?

Replace it with sample data before pasting.

Do I need to know advanced functions?

No, but understanding the formula you receive lets you catch errors.

Sources and further reading

  • Microsoft Support: Excel functions.

Go deeper with the book

Maestría Financiera: ChatGPT y Excel, La Fusión Definitiva para Analistas del Siglo XXI — Spanish edition · PDF eBook · instant download · sold on Gumroad · $11.99 USD. According to its official description: A practical manual for combining ChatGPT and Excel in finance: effective prompts, advanced Excel, complex formulas and VBA generated with AI, spreadsheet debugging, task automation, scenario analysis, company valuation, portfolio optimization, risk… The examples in this guide are illustrative and are not necessarily from the book.

Get the book on Gumroad · $11.99 USDFull book page →

Educational content. Not professional advice. See the full store →