Spreadsheet Practice

Why does IF fail on a value that displays as the pass mark?

Formula (Excel and Google Sheets)

=IF(ROUND(B2,0)>=$F$1,"Pass","Fail")

The cell shows a rounded number but stores the decimals, and IF tests the stored value. Round in the test: =IF(ROUND(B2,0)>=$F$1,"Pass","Fail").

Result on the example
one result per row in C2, filled down to C7
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in C2, filled down to C7. Change any input and the result updates, or edit the formula to experiment.

How it works

The averages are formatted without decimals, so 69.96 displays as 70, but the cell still holds 69.96 and IF compares that. When the rule is "the grade as shown counts", round inside the test: ROUND(B2,0) is 70 for Ava and Cleo, so they pass, while Eve and Finn round to 69 and still fail.

=IF(ROUND(B2,0)>=$F$1,"Pass","Fail")

Result"Pass"

  1. B270

    The value in B2.

  2. ROUND(B2,0)70

    ROUND: Rounds to a number of digits; negative digits round left of the decimal.

    • numberB270
    • num_digits0
  3. $F$170

    The value in F1.

  4. ROUND(B2,0)>=$F$1TRUE

    The >= operator tests at least.

  5. IF(ROUND(B2,0)>=$F$1,"Pass","Fail")"Pass"

    IF: Returns one value if a test is true, another if false.

    • logical_testROUND(B2,0)>=$F$1TRUE
    • value_if_true"Pass"
    • value_if_false"Fail"not used

In Google Sheets

The same formula works in Google Sheets: =IF(ROUND(B2,0)>=$F$1,"Pass","Fail"). We ran it in Google Sheets mode on the same data and it returns the same results.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=IF(B2>=$F$1,"Pass","Fail")Fail, Pass, Fail…Different resultCompares the stored value, which is right if the policy says 69.96 doesn't pass. Ava and Cleo fail although their averages display as 70.

Common mistakes

  • Decide which value the rule means. Rounding in the test is a policy choice, not just a fix.
  • The same mismatch affects lookups and equality tests on calculated values. Round both sides when comparing.

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Why does IF fail on a value that displays as the pass mark

In C2, show "Pass" when the average, rounded to a whole number as displayed, reaches the pass mark in F1, otherwise "Fail". Fill down to C7.

Questions

How do I round the stored value itself?

Round where it is calculated: =ROUND(AVERAGE(C2:F2),0).

How does ROUND treat 69.5?

It rounds halves away from zero, so 69.5 becomes 70.

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.