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

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

**Excel:** `=IF(ROUND(B2,0)>=$F$1,"Pass","Fail")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Student | Average | Result |  | Pass mark | 70 |
| Ava | 69.96 |  |  |  |  |
| Ben | 74.2 |  |  |  |  |
| Cleo | 69.5 |  |  |  |  |
| Dan | 70 |  |  |  |  |
| Eve | 68.7 |  |  |  |  |
| Finn | 69.45 |  |  |  |  |

Formula in C2, filled to C7: `=IF(ROUND(B2,0)>=$F$1,"Pass","Fail")`

Result: Pass; Pass; Pass; Pass; Fail; Fail

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

## Other ways

- `=IF(B2>=$F$1,"Pass","Fail")`: Compares 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.

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

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/if-fails-on-a-rounded-value
