Function reference · Math & aggregation

SUMIF

Adds up the numbers in a range, but only the rows that meet one condition.

SUMIF(range, criterion, [sum_range])

SUMIF is the workhorse of every summary tab: total sales for one region, total hours for one person, total spend in one category.

Arguments

ArgumentRequiredWhat it does
range Yes The range the condition is tested against.
criterion Yes What to test for — a value, or a comparison in quotes such as ">800".
sum_range Optional The numbers to add. Omit it to add up `range` itself.

Worked example

RegionRepSales
WestAna1200
EastBen900
WestCara1500
NorthDan600
EastEve1100
=SUMIF(A2:A6, "West", C2:C6)

Returns 2700.

Sales are added only for the rows whose region is West.

Gotchas

Related functions