Free SUMIF practice
SUMIF practice exercises
SUMIF adds up values that meet a single condition; note that the sum range comes last. 5 reps, from easy to hard, each checked in a real spreadsheet engine. 2 free, 3 with Pro.
=SUMIF(range, criteria, [sum_range])
SUMIF guide
How to use SUMIF in Excel
SUMIF adds up values that meet a single condition: the sales for one region, or every order over 200. It's the older, one-condition version of SUMIFS, and many existing workbooks and tests still use it.
Watch the argument order: in SUMIF the range to add comes last, after the condition. In SUMIFS it comes first.
Syntax
=SUMIF(range, criteria, [sum_range])
| Argument | What it is |
|---|---|
range | The cells to check against the condition, such as A2:A7. |
criteria | What they must match: text in quotes, a cell, or a comparison such as ">=200". |
sum_range | Optional. The numbers to add. Leave it out to add the checked cells themselves. |
Examples
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Product | Units | Sales | North sales | |
| 2 | North | Widget | 4 | 200 | 625 | |
| 3 | South | Gadget | 2 | 150 | ||
| 4 | North | Gadget | 5 | 375 | ||
| 5 | East | Widget | 3 | 150 | ||
| 6 | North | Widget | 1 | 50 | ||
| 7 | South | Widget | 6 | 300 |
=SUMIF(A2:A7,"North",D2:D7) returns 625.
sum_range, SUMIF adds the cells that meet the condition: every sale of 200 or more.| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Product | Units | Sales | Big sales | |
| 2 | North | Widget | 4 | 200 | 875 | |
| 3 | South | Gadget | 2 | 150 | ||
| 4 | North | Gadget | 5 | 375 | ||
| 5 | East | Widget | 3 | 150 | ||
| 6 | North | Widget | 1 | 50 | ||
| 7 | South | Widget | 6 | 300 |
=SUMIF(D2:D7,">=200") returns 875.
F2.| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Region | Product | Units | Sales | Product | Sales | |
| 2 | North | Widget | 4 | 200 | Widget | 700 | |
| 3 | South | Gadget | 2 | 150 | |||
| 4 | North | Gadget | 5 | 375 | |||
| 5 | East | Widget | 3 | 150 | |||
| 6 | North | Widget | 1 | 50 | |||
| 7 | South | Widget | 6 | 300 |
=SUMIF(B2:B7,F2,D2:D7) returns 700.
Common mistakes
Using the SUMIFS order
In SUMIF the range to add comes last. Putting it first checks the sales for the word North, finds nothing, and returns 0.
Wrong=SUMIF(D2:D7,"North",A2:A7) → 0
Right=SUMIF(A2:A7,"North",D2:D7) → 625
Leaving out sum_range on text
Without sum_range, SUMIF adds the checked cells. These are region names, so the total is 0.
Wrong=SUMIF(A2:A7,"North") → 0
Right=SUMIF(A2:A7,"North",D2:D7) → 625
SUMIF questions
Should I use SUMIF or SUMIFS?
SUMIFS. It handles one condition or many, and its argument order stays the same as you add conditions. Learn SUMIF so you can read existing workbooks.
Can SUMIF use wildcards?
Yes: "*Widget*" matches text that contains Widget, and "W*" matches text that starts with W.
How do I sum with two conditions?
SUMIF only takes one. Use SUMIFS: =SUMIFS(D2:D7,A2:A7,"North",B2:B7,"Widget").
Related functions
Reading is the warm-up
The reps are what make it stick. Try SUMIF in the practice sheet above.