Math & Trig

SUMIF Formula

SUMIF adds up values in a range where corresponding cells meet a specified condition. It is the go-to function for conditional totaling, such as summing sales for a specific region, totaling expenses in a category, or adding up hours for a particular employee. For multiple conditions, use SUMIFS.

Syntax

SUMIF(range, criteria, [sum_range])
ParameterDescription
range Parameter of the SUMIF function.
criteria Parameter of the SUMIF function.
[sum_range] (Optional.) Parameter of the SUMIF function.
Try SUMIF in Viztab — free, no signup

Examples

ABC
1RegionRepSales
2WestAlice12000
3EastBob8500
4WestCarol15200
5EastDave9300
6WestEve18000

Sum sales for one region

Formula
=SUMIF(A2:A100, "West", C2:C100)
Returns: 45,200 — total of all sales amounts where the region column says "West"

Sum values above a threshold

Formula
=SUMIF(B2:B50, ">1000", B2:B50)
Returns: 28,500 — adds up only the values that exceed 1,000

Sum expenses for a category

Formula
=SUMIF(A2:A200, "Marketing", B2:B200)
Returns: 12,350 — total spending where the category is "Marketing"

Common Errors

#VALUE!

The range and sum_range are different sizes. They must have the same number of rows (or columns).

Returns 0

The criteria does not match any cells. Check for trailing spaces or mismatched text. Try using wildcards.

Tips

Criteria from a cell

Reference a cell for dynamic criteria: =SUMIF(A:A, F1, C:C) where F1 contains the region name.

Wildcards work

Use * and ? in criteria: =SUMIF(A:A, "Mar*", B:B) sums all rows starting with "Mar" (Marketing, March, etc).

Sum_range shortcut

If the criteria range and sum range are the same, you can omit the third argument: =SUMIF(B:B, ">100").

Try SUMIF in Viztab

Import your data and use SUMIF with 370+ other formulas. No signup required.

Open Viztab

Related Formulas