Regional sales with two filters (SUMIFS)

Medium Math
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.

The problem

Problem statement

You run the numbers for a tea chain. The manager for the region in E1 asks: how much Oolong revenue did we actually book? The log is in A2:C11 — Region in A, Product in B, Amount in C. Total only the rows that are East AND Oolong, and put the sum in the E2 cell E2.

SUMIFS takes the sum range first, then the criteria pairs — case 3 matches nothing and must return 0, not an error.

Problem data

Show the sheet as a table (selectable, copyable)
The exercise data, as a table
ABCE
1 RegionProductAmountEast
2 EastOolong120
3 WestOolong90
4 EastJasmine80
5 NorthOolong110
6 EastOolong140
7 WestOolong95
8 SouthOolong105
9 EastJasmine70
10 NorthOolong100
11 EastOolong95

Notes

SUMIFS puts the sum range FIRST: =SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2, ...). SUMIF reverses this (criteria range first, optional sum range last) — mixing up the two orders is the #1 SUMIFS mistake. All ranges must be the same size, and multiple conditions are ANDed: a row must satisfy every pair to be included.

How to approach

Your answer goes in E2. 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 E2
  2. The sum range is C2:C11 — it comes first in SUMIFS
  3. Pair 1: A2:A11 with "East"; pair 2: B2:B11 with "Oolong"
  4. Shape: =SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2) — the order matters

Official solutions

Show 2 solutions — try it yourself first

Approach 1: SUMIFS with two criteria pairs

=SUMIFS(C2:C11, A2:A11, "East", B2:B11, "Oolong")

SUMIFS keeps a row only when Region is East and Product is Oolong, then sums Amount over those rows: 120 + 140 + 95 = 355.

Approach 2: SUMIFS with criteria from label cells

=SUMIFS(C2:C11, A2:A11, E1, B2:B11, "Oolong")

E1 already says "East", so the first criteria can point at it. Pointing both criteria at label cells turns the formula into a reusable mini-report: change the labels, get another region's number.

Function guide

Related practice

FAQ

What is the SUMIFS formula for multiple criteria?

=SUMIFS(C2:C11, A2:A11, "East", B2:B11, "Oolong") — sum range first, then range/criteria pairs. Every pair is a required (AND) condition.

Why does SUMIFS put the sum range first but SUMIF doesn't?

Historical inconsistency: =SUMIF(criteria_range, criteria, [sum_range]) has the sum range last and optional, while =SUMIFS(sum_range, range1, crit1, ...) requires it first. SUMIFS works for single conditions too, so many people just default to it.

How do I sum with OR logic (East OR West)?

Criteria pairs inside one SUMIFS are ANDed, so add two SUMIFS: =SUMIFS(C2:C11,A2:A11,"East",B2:B11,"Oolong")+SUMIFS(C2:C11,A2:A11,"West",B2:B11,"Oolong").