Fix SUMIF: right criteria, wrong sum range

Hard Math 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 F2 returns 210 for North. No error appears — the number just does not match the Units column.
Cause The criteria range is A2:A6, but the third argument sums C2:C6 (Target), not B2:B6 (Units).
Repair Point the third argument at the column you actually want to total. Keep the criterion unchanged.

The problem

Problem statement

The North total in Total cell F2 is a number — just not the right one. The formula is already there. Diagnose why SUMIF quietly totals the wrong column and repair it.

Keep the same criteria range and criterion; only the sum range is wrong.

Problem data

Show the sheet as a table (selectable, copyable)
The exercise data, as a table
ABCEF
1 RegionUnitsTargetRegionTotal units
2 North1250North
3 South2060
4 North1570
5 West880
6 North1090

Notes

SUMIF never complains when the sum range is the wrong column: it happily adds numbers that happen to sit there. The third argument must be the column you actually want to total — Units in B, not Target in C. A plausible wrong answer is more dangerous than an error.

How to approach

Your answer goes in F2. 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 F2 — the result looks reasonable but is wrong
  2. Compare the first and third arguments of the SUMIF already in F2
  3. The criterion is correct; only the column being added is wrong
  4. Shape: =SUMIF(?, ?, B2:B6)

Official solutions

Show 2 solutions — try it yourself first

Approach 1: locked sum range

=SUMIF($A$2:$A$6,$E$2,$B$2:$B$6)

The criteria column is A, the criterion is E2, and the sum column is now Units (B): 12 + 15 + 10 = 37. C held targets and produced a believable but meaningless 210.

Approach 2: relative ranges

=SUMIF(A2:A6,E2,B2:B6)

The same repair without $ — fine for a single cell. Locking the ranges is safer if the formula will be copied.

Function guide

Related practice

FAQ

Why does SUMIF give a wrong number instead of an error?

Because the third argument is still a valid range. SUMIF adds whatever numbers are in it, so pointing it at the wrong column produces a plausible but meaningless total.

How do I spot this in a real report?

Check that the criteria range and the sum range have the same shape and describe the same rows, and sanity-check the total against the source column.