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(A2:A6,"North",C2:C6)
ABCDE
1RegionProductSales1170
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

In plain words: Add up the sales in C2:C6 on the rows where the region in A2:A6 is North.

E1=SUMIF(C2:C6,">300")
ABCDE
1RegionProductSales920
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

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.

Related functions