Fix IF: the boundary fails by one
Diagnose before you fix
IF is already in the cell. The problem
Problem statement
Score 90 should pass a pass mark of 90, but Result cell C2 says Fail. The IF formula is already there. Diagnose the boundary bug and repair it.
Change only the comparison operator; the score and pass mark cells are locked.
Problem data
Show the sheet as a table (selectable, copyable)
| A | C | E | |
|---|---|---|---|
| 1 | Score | Result | Pass mark |
| 2 | 90 | 90 |
Notes
A pass mark is usually inclusive: exactly 90 passes. The formula uses >, which excludes the boundary. >= (or the equivalent inverted test <) includes it. Boundary bugs hide because a quick test with a clearly higher score still works.
How to approach
Your answer goes in C2. On submit we re-run your formula against 3 different sets of input, so a hardcoded number will fail — the formula has to follow the cells.
- Target cell is C2 — 90 against a pass mark of 90 returns Fail
- Look at the comparison operator in the
IFalready in C2 - The boundary value must be included, not excluded
- Shape:
=IF(A2>=?, "Pass", "Fail")
Official solutions
Show 2 solutions — try it yourself first
Approach 1: inclusive comparison
=IF(A2>=E2,"Pass","Fail")
>= includes the pass mark itself: 90 >= 90 is true, so the boundary passes while 89 still fails.
Approach 2: invert the test
=IF(A2<E2,"Fail","Pass")
Saying “below the mark fails” puts 90 on the Pass side without using >=. Same boundary, opposite wording.
Function guide
FAQ
Why does a score equal to the pass mark fail?
Because the formula uses >, which is strict. An inclusive pass mark needs >= (or an inverted < test).
Why not just type 90 in the formula?
The pass mark lives in E2 and may change. A formula that references the cell keeps working when it does.