Math & Trig Modern

SUMIF

Adds the cells in a range that meet a single condition.

Available in All versions

Syntax

SUMIF(range, criteria, [sum_range])

What it returns

The sum of the cells that match the criteria.

Arguments

ArgumentRequiredDescription
range Yes The cells to test against the criteria.
criteria Yes The condition that decides which cells to add (e.g. ">100", "Paris").
sum_range No The cells to add; if omitted, range itself is summed.

Example

Criteria
City = "Paris"
AB
1CityAmount
2Paris120
3Lyon80
4Paris200
5Nice150
Total
320

Add up Amount only for rows where City is Paris (120 + 200).

=SUMIF(A2:A100, "Paris", B2:B100)

Important to know

sum_range comes LAST and is optional — if omitted, range itself is summed.

Argument order is the reverse of SUMIFS.

For multiple conditions, use SUMIFS.

Related functions

Related learning