Syntax
=SUMIF(range, criterion, [sum_range])
range- The cells to test against the criterion.
criterion- The condition, e.g. "West", ">1000" or a cell reference.
sum_range- Optional. The cells to add up. If omitted, the cells in range are summed.
SUMIF adds up values that meet one condition, such as total revenue for the West region or the sum of all orders over $1,000.
=SUMIF(range, criterion, [sum_range])
rangecriterionsum_rangeTotal the sales for the East region. Answer in E2.
Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.
Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Region | Product | Units | Revenue |
| 2 | Ava | West | Monitor | 12 | $2,400.00 |
| 3 | Liam | East | Keyboard | 30 | $1,500.00 |
| 4 | Maya | West | Mouse | 45 | $900.00 |
| 5 | Noah | North | Monitor | 8 | $1,600.00 |
| 6 | Zara | East | Monitor | 15 | $3,000.00 |
| 7 | Omar | West | Keyboard | 22 | $1,100.00 |
| Formula | Result | What it shows |
|---|---|---|
=SUMIF(B2:B7, "West", E2:E7) | $4,400.00 | Revenue from the West. |
=SUMIF(E2:E7, ">2000") | $5,400.00 | Without sum_range, the tested cells themselves are added. |
=SUMIF(C2:C7, "*board", D2:D7) | 52 | Wildcards work: products ending in "board". |
Learning step by step? SUMIF is covered in Lesson 13: SUMIF Function of the free course.