Conditional function

Google Sheets SUMIF function

Adds the values in a range that meet one condition.

Syntax

=SUMIF(range, criterion, [sum_range])
rangeThe cells to test against the criterion.
criterionThe condition, such as "East", ">100" or a cell reference.
sum_rangeOptional. The cells to add up. If left out, range itself is added.

Try it

Edit the formula and the result updates instantly. Click a cell to add its reference.

▦ Q1 sales
fx
Result: 1095
ABCDE
1RepRegionProductUnitsRevenue
2AnaEastPens120240
3BenWestPaper80400
4CaraEastPaper45225
5DevNorthPens200400
6AnaEastInk30450
7BenWestPens95190
8CaraEastInk12180
9DevNorthPaper60300

Examples

These use the sample sheet above.

→ 1095

Total revenue from the East region.

→ 320

Total units from rows that sold more than 100.

→ 690

Use a cell as the criterion: everything Ana sold.

Tips & common mistakes

Related functions