Compare a score to the middle value
The problem
Problem statement
You're analyzing a class quiz: the five scores are already entered in A2:A6, and you want to know whether the first student's score in A2 sits above, below, or right at the middle of the class. Fill the vs Middle cell B2 — return Above, Below, or Equal.
The median moves with the data — recompute it inside the formula and keep the Equal branch (case 3).
Problem data
Show the sheet as a table (selectable, copyable)
| A | B | |
|---|---|---|
| 1 | Score | vs Middle |
| 2 | 70 | |
| 3 | 85 | |
| 4 | 90 | |
| 5 | 60 | |
| 6 | 80 |
Notes
Use MEDIAN for the middle value of an unsorted list. Lock the median range with $ if you plan to fill the formula down.
How to approach
Your answer goes in B2. 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.
MEDIAN(A2:A6)finds the middle score- Wrap the comparison in nested
IF(orIFS) - Lock the median range with $ if you will fill down
Official solutions
Show 1 solution — try it yourself first
Approach 1: IF + MEDIAN with locked range
=IF(A2>MEDIAN($A$2:$A$6),"Above",IF(A2<MEDIAN($A$2:$A$6),"Below","Equal"))
Calculates the median of range A2:A6 and compares cell A2. If greater return Above, if lesser return Below, otherwise Equal.
Function guide
FAQ
How do I compare a value to the median in Excel?
Combine IF with MEDIAN, for example =IF(A2>MEDIAN($A$2:$A$6),"Above",IF(A2<MEDIAN($A$2:$A$6),"Below","Equal")).
Why lock the median range with $?
Absolute references keep the full list fixed when you fill the formula down to other rows.