Compare a score to the middle value

Medium Logic
Description
Hints 0/3
Solutions 1
–
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.

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)
The exercise data, as a table
AB
1 Scorevs 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.

  1. MEDIAN(A2:A6) finds the middle score
  2. Wrap the comparison in nested IF (or IFS)
  3. 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

Related practice

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.