AI-Written Spreadsheet Formulas Need the Same Checks as Any Other Code

AI makes complex spreadsheet formulas easy to produce. But a formula is a small program, and an unchecked one can quietly put wrong numbers into real decisions.

  • Tran Anh Vu
  • 28 Nov 2026
  • 6 min read
AI-Written Spreadsheet Formulas Need the Same Checks as Any Other Code

Spreadsheets run a surprising share of business. Budgets, sales forecasts, pricing models, payroll calculations, inventory plans and commission schemes often live in spreadsheets built by one or two people. For years, the main limit on these files was skill: complex formulas required experience, and many employees avoided them.

AI has removed much of that limit. Today, anyone can describe what they want, "sum sales by region for the last quarter, excluding returns," and receive a working formula in seconds. Lookups, nested conditions, array functions and pivot logic that once required an expert now appear on request. For many teams, this is a genuine productivity gain.

But a formula is a small program. It takes inputs, applies logic and produces outputs that people trust and act on. When AI writes that program and no one checks it, errors can enter decisions quietly. A wrong range, a missed condition or a misunderstood definition does not produce an error message. It produces a plausible number.

The Misconception: If the Formula Runs, It Is Right

Spreadsheets give immediate feedback when a formula is broken. A missing bracket or an invalid reference produces an obvious error. This creates a false sense of safety: if the cell shows a number, the formula must be working.

The most dangerous errors are not the ones that break. They are the ones that run. A formula that looks at the wrong column, includes a header row, ignores blank cells differently than expected or applies a condition to the wrong field will still return a result. That result may even look reasonable, especially when people do not know what the correct answer should be.

AI makes this risk more common for a simple reason. People now use formulas they could not have written themselves, which means they are less able to judge whether those formulas are correct.

Where AI-Written Formulas Commonly Go Wrong

Ambiguous Requests

"Revenue by customer" may mean gross or net, invoiced or paid, with or without tax. AI chooses one interpretation, and it may not be the one the business uses.

Wrong Ranges

Formulas may reference a fixed range that misses new rows added later, or include totals and headers by mistake.

Hidden Assumptions About Data

AI may assume dates are stored as dates, that categories are spelled consistently or that there are no duplicates. Real business data often breaks these assumptions.

Edge Cases

Zero values, blank cells, negative numbers, returns and partial periods are frequently handled in ways no one intended.

Copying Errors

A formula that works in one cell may behave differently when copied across rows or columns if references are not anchored correctly.

Overly Complex Logic

AI can produce long, nested formulas that no one on the team can read or maintain. When something changes, no one knows how to fix it safely.

Why This Matters

Spreadsheet errors are not just technical problems. They can lead to wrong prices, incorrect commissions, flawed budgets, misreported results and poor investment decisions. Because spreadsheets are often shared and copied, one wrong formula can spread across several files and teams before anyone notices.

The risk grows as AI makes it easier to build bigger, more complex spreadsheets quickly. Speed of construction is increasing faster than the habits of verification.

A Practical Framework: Treat Formulas Like Code

1. Write the Definition First

Before asking AI for a formula, write down exactly what the result should mean: which data is included, which is excluded and how special cases should be handled. This also produces a better request.

2. Ask AI to Explain the Formula

Request a plain-language explanation of what the formula does, step by step. If the explanation does not match your definition, the formula is wrong even if it runs.

3. Test With Known Answers

Create a small test case where you already know the correct result, for example five rows calculated by hand, and confirm the formula matches it.

4. Check Edge Cases Deliberately

Add rows with blanks, zeros, returns, duplicates and unusual values to see how the formula behaves.

5. Add Reconciliation Totals

Include simple control totals that should always match, such as the sum of regional sales equaling total sales. A mismatch reveals errors immediately.

6. Prefer Readable Over Clever

If a formula is too complex to understand, ask AI to split it into helper columns or simpler steps. Maintainable logic is safer than compact logic.

7. Review Critical Spreadsheets

For files that drive pricing, payroll, financial reporting or major decisions, have a second person review key formulas before they are used.

A Worked Example: A Sales Commission Sheet

Consider a sales manager who uses AI to build a commission calculator for a team of fifteen. She asks for a formula that calculates each person's commission as five percent of their monthly sales, rising to seven percent above a target.

The AI produces a neat formula, and the results look reasonable. Before using it, she writes a short definition: commission applies to paid invoices only, excludes returns and uses the target set for each person rather than a single team target.

When she asks the AI to explain its formula, she sees that it uses all invoices, including unpaid ones, and a single target for everyone. She corrects the request. She then creates a test with three salespeople whose commission she calculates by hand, including one with a return and one who just crosses the target. The revised formula matches all three.

She adds a control total that checks whether total commissions equal the sum of individual calculations, and asks a colleague in finance to review the logic once. The whole process takes about an hour. Without it, the first month's payments would have been wrong for several people, and the error might have continued for months.

Building Better Habits Across the Organization

Organizations that rely on spreadsheets can make verification part of normal practice:

  • Label AI-assisted files so reviewers know where extra checks are needed.
  • Keep a short notes tab in important spreadsheets explaining what key formulas do and what assumptions they make.
  • Identify critical spreadsheets and give each one an owner responsible for its accuracy.
  • Train staff in basic testing with known answers and control totals, not only in using AI to write formulas.
  • Review periodically when data structures or business rules change.

The Strategic Implication: Easier Building Requires Stronger Checking

AI has made spreadsheet modeling more accessible, which is a real benefit. More people can analyze data and build tools for their own work. But when building becomes easy, checking becomes the main source of quality.

Organizations that develop simple verification habits will get the benefits of AI-assisted analysis without the hidden costs. Those that do not will make faster decisions based on numbers no one has actually confirmed.

Conclusion

An AI-written formula that runs is not necessarily a formula that is right. Every formula is a small program, and programs need definitions, tests and reviews.

The good news is that the checks are simple: define what you want, ask for an explanation, test with known answers, examine edge cases and add control totals. These habits take minutes and protect decisions that may be worth far more.

Key Takeaways

  • AI makes complex spreadsheet formulas easy, including for people who cannot verify them.
  • The most dangerous errors run without error messages and produce plausible numbers.
  • Common problems include ambiguous definitions, wrong ranges, hidden data assumptions and edge cases.
  • Define results first, ask for explanations, test with known answers and add control totals.
  • As building becomes easier, verification becomes the main source of spreadsheet quality.
  • Applied AI
  • Spreadsheets
  • Data Quality
  • Financial Controls
  • AI Verification

Contact

Let’s design the next layer of AI marketing capability.

For advisory, speaking, training, research or partnership opportunities, reach out directly. I usually reply by email.