The SUMIF function
Adds the cells that meet one condition. The condition can be checked in the same range or in another column.
Syntax
SUMIF(range, criteria, [sum_range])- range
- The cells the condition is checked against.
- criteria
- The condition, such as "North", ">300" or a cell like E1.
- sum_range (optional)
- The cells to add. If left out, range itself is added.
Examples
E1
=SUMIF(1A2:A6,2"North",3C2:C6)| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Product | Sales | 1170 | |
| 2 | North | Shoes | 500 | ||
| 3 | South | Shoes | 300 | ||
| 4 | North | Bags | 250 | ||
| 5 | North | Shoes | 420 | ||
| 6 | South | Bags | 180 |
In plain words: Add up 3the sales in C2:C6 on the rows where 1the region in A2:A6 is 2North.
E1=SUMIF(C2:C6,">300")
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Product | Sales | 920 | |
| 2 | North | Shoes | 500 | ||
| 3 | South | Shoes | 300 | ||
| 4 | North | Bags | 250 | ||
| 5 | North | Shoes | 420 | ||
| 6 | South | Bags | 180 |
Practice SUMIF
Read the guide
Questions
How do I use SUMIF with a cell as the condition?
Point the criteria at the cell, like =SUMIF(A2:A6,E1,C2:C6). For a comparison, join the operator with &: ">"&E1.