Fix IF: the boundary fails by one

Hard Logic Debug
Description
Hints 0/4
Solutions 2
–
Test case
1
2
3
Reset
Submit
fx
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9
10
Loading interactive spreadsheet...
Preparing grid cells and formula calculation engine
○ Ready Enter formula in highlighted cells, then click Submit.

Diagnose before you fix

Symptom C2 says Fail for a score of 90 against a pass mark of 90. The broken IF is already in the cell.
Cause The comparison uses >, which is strict. A score exactly equal to the mark lands on the wrong branch.
Repair Make the boundary inclusive (>=), or invert the test so “below the mark” fails.

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)
The exercise data, as a table
ACE
1 ScoreResultPass mark
2 9090

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.

  1. Target cell is C2 — 90 against a pass mark of 90 returns Fail
  2. Look at the comparison operator in the IF already in C2
  3. The boundary value must be included, not excluded
  4. 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

Related practice

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.