SUMIF in Excel: what it does and how to use it

SUMIF adds up the numbers in a column, but only on the rows that meet one condition you set.

Syntax

SUMIF(range, criteria, [sum_range])

range
The column to check against your condition.
criteria
What to look for. Text goes in quotes; a comparison such as ">1000" does too.
sum_range
The column holding the numbers to add. Leave it out and Excel adds the first column instead.

When to use it

Any total that applies to one group: sales for a single customer, hours on one project, costs in one category.

What trips people up

The argument order is the opposite way round from SUMIFS. SUMIF ends with the column to add; SUMIFS begins with it. If you use both, use SUMIFS everywhere so the order never changes.

Watch it built, step by step

Questions

Can SUMIF use more than one condition?

No. SUMIF takes exactly one. For two or more, use SUMIFS, which accepts as many column-and-condition pairs as you need.

How do I add up values above a certain number?

Put the comparison in quotes as the condition: =SUMIF(B:B,">1000") adds every value in B that is over 1000. To compare against a cell instead, join it on: ">"&D1.

Why does SUMIF return 0?

Either the condition never matches, often because of a stray space or a different spelling, or the numbers being added are stored as text, which SUMIF skips. A plain SUM of the same column tells you which: if that is also 0, the numbers are text.

Related functions

Settings: separator, Excel version

Argument separator

Set by your computer's language, not by the file. A frequent cause of a correct-looking formula being rejected.

Excel version

XLOOKUP, IFS, TEXTBEFORE and TEXTJOIN need Microsoft 365 or 2021; older versions return #NAME? instead. Choosing the older one switches every walkthrough to a formula that works there.