ExcelyourTraining

Home › Blog

AI Excel Formula Wrong? How to Check the Cut-Off Before You Trust It

You asked an AI assistant for an Excel formula. It answered in seconds, the formula ran without an error, and the results look sensible. Then someone points out that one person ended up in the wrong group.

It's an easy slip to miss, and usually it isn't a dramatic failure. It's one character in the wrong place. In this post you'll see the most common way an AI-written IF formula goes wrong, why it happens, and a simple test you can run on any formula in under a minute.

Can AI write Excel formulas?

Yes, and often well. For everyday logic like "show Pass if the mark is 50 or more", AI assistants in Excel and general chatbots will usually give you a correct IF formula. That saves real time, especially if you're still learning the syntax.

But the AI only knows what you typed. If your request can be read two ways, it has to pick one, and it won't always pick the one you meant. The formula will still run. Excel can't tell that the logic doesn't match the rule in your head. That part is your job.

The case that goes wrong: "above 75"

Here's a scenario. Aisha works in HR at a company in Johannesburg. Staff who score well on a compliance assessment qualify for an advanced course. Her manager's email says: "Everyone who scored above 75 goes on the advanced course."

Aisha asks the AI assistant: "Mark staff who scored above 75 as Advanced, everyone else as Standard."

The AI writes:

=IF(B2>75,"Advanced","Standard")

She fills it down the column.

Name Score AI result
Thandi 91 Advanced
Pieter 76 Advanced
Lerato 75 Standard
Sipho 74 Standard

Look at Lerato. She scored exactly 75 and she's been left out.

Is the formula wrong? Strictly, no. "Above 75" means more than 75, and > means greater than. The AI did exactly what the words said. But when Aisha checks with her manager, it turns out he meant "75 and above". In everyday speech, people say "above 75" or "over 75" when they really mean "75 or more" all the time.

The fix is one character:

=IF(B2>=75,"Advanced","Standard")

Now Lerato is in. The point isn't that the AI made a silly mistake. It's that a fuzzy rule turned into a precise formula, and the precise version didn't match what the business wanted.

Greater than vs greater than or equal

This is the single most important thing to check in any formula with a cut-off.

Operator Means Includes exactly 75?
>75 greater than 75 No
>=75 greater than or equal to 75 Yes
<75 less than 75 No
<=75 less than or equal to 75 Yes

Whenever a formula contains > or <, ask yourself one question: what should happen to someone sitting exactly on the number? If the answer is "they qualify", you need the version with the equals sign.

The same thing shows up outside of assessments. "Orders over R500 get free delivery." Does an order of exactly R500 qualify? "Commission on sales above R50 000." What about a rep who sold exactly R50 000? Targets and prices are often round numbers, so someone landing exactly on the line is not unusual.

The three-value test

Here's a quick check you can run on any IF formula, whether you or an AI wrote it. For every cut-off in the formula, test three values:

  1. Just below the cut-off
  2. Exactly on the cut-off
  3. Just above the cut-off

For Aisha's rule, that's 74, 75 and 76. Type them into spare cells, point the formula at them and see what comes back.

Test score Should be >75 gives >=75 gives
74 Standard Standard Standard
75 Advanced Standard Advanced
76 Advanced Advanced Advanced

The middle row catches the problem straight away. If the formula has several cut-offs, like a nested IF or an IFS with Distinction, Pass and Fail bands, run the three-value test on each one.

Four more things to check in an AI-written formula

The boundary is the most common slip, but it isn't the only one. Before you trust a formula, run through these:

Ask better, then still check

You can cut down on these mistakes by being precise in your request. Instead of "above 75", say "75 or more" or "at least 75". Instead of "between 50 and 74", say "from 50 up to and including 74". Clear words give clearer formulas.

You still need to check, though. Being able to explain why >= and > give different answers, and to prove it with a quick test, is a useful skill to have. Excel assessments for job applications often include IF questions, and showing that you check your work, including work an AI did for you, tells an employer you can be trusted with their data.

Practise checking AI's work

ExcelyourTraining has an AI lesson in every module where you practise exactly this. In lesson 16, the AI assistant gets a pass or fail rule right. Then you ask it for "above 75", it writes >75, and you have to catch the score of exactly 75 that it misses.

If you'd like a warm-up first, practise comparisons in lesson 11 and write your own IF formulas in lesson 12. Each answer is checked the moment you press Enter.

It's free, with no sign-up and nothing to install. Open lesson 16 and see if you can catch the missing 75.