Excel function reference

SUMIF

Quick answer

Adds up only the cells that meet one condition: the single-criterion sibling of SUMIFS.

SUMIF(range, criteria, [sum_range])

SUMIF is exactly what SUMIFS becomes when there's only one condition to check: total expenses for one category, total revenue for one region, total invoice amounts over a threshold. It's simpler to write than SUMIFS for the one-condition case, but that simplicity comes with an argument order that trips people up the moment a second condition shows up.

Reach for SUMIF when a formula will only ever need one test. The moment a second condition is even plausible, SUMIFS is the better starting point, since SUMIFS reads cleanly with any number of criteria from one upward and saves a rewrite later.

Syntax

SUMIF(range, criteria, [sum_range])
ArgumentDescription
rangeRequired. The cells to test against criteria.
criteriaRequired. What a cell in range must match: a number, text, or a comparison like ">100".
sum_rangeOptional. The cells to actually add up, if different from range. Omit it and SUMIF adds up range itself.

The mistake almost everyone makes

Forgetting sum_range when the column you want to total isn't the same column you're testing. Leave sum_range out and SUMIF doesn't error; it just adds up range itself, which silently gives you a number from the wrong column entirely. If the column you're testing happens to also contain numbers, the formula will return a result that looks entirely plausible while answering a completely different question than the one you meant to ask.

The related mistake is giving criteria a range and sum_range of different sizes. They need to line up row for row, exactly like every other member of the SUMIF/SUMIFS/COUNTIFS/AVERAGEIFS family.

A real example: totaling expense submissions by category

Say you're reviewing an expense report and need the total for just the Travel category:

=SUMIF(A2:A4,"Travel",B2:B4)

Column A holds the category, column B the amount, and sum_range (column B) is explicitly given rather than left to default. This is the habit worth building even when range and sum_range happen to be the same column today: being explicit means the formula still works correctly if someone later inserts a new amount column next to the category column.

Worked examples

Total for one category
AB
1CategoryAmount
2Travel120
3Meals45
4Travel80
=SUMIF(A2:A4,"Travel",B2:B4) → 200
A threshold instead of an exact match
AB
1InvoiceTotal
2INV-190
3INV-2210
4INV-3150
=SUMIF(B2:B4,">100") → 360

No separate sum_range needed when the test range and the numbers to add are the same column.

Common mistakes

  • Forgetting sum_range when the column to total isn't the column being tested; without it, SUMIF just adds up range itself.
  • Giving criteria range and sum_range different sizes. They need to line up row for row.
  • Reaching for SUMIF when a second condition is about to be needed. Starting with SUMIFS from the outset avoids a rewrite later.

Related functions

Try it yourself

A free, graded practice exercise using this exact function: instant feedback, no signup required.

Practice SUMIF →