SUMIF in Google Sheets
Adds the cells that meet one condition. The condition can be checked in the same range or in another column.
In Google Sheets
SUMIF takes the same arguments in Google Sheets, and criteria such as ">100" and "N*" work the same way.
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 |