Excel SUMIF Formula Guide with Real Examples
SUMIF adds up only the numbers that meet a condition. It's the formula behind almost every "total by category" report — sales by region, expenses by type, hours by project. Here's how it works, with examples you can copy.
The syntax.
=SUMIF(range, criteria, [sum_range])
- range — the cells Excel checks against your condition.
- criteria — the condition (text, a number, or an expression).
- sum_range — the cells to actually add. Optional — if you leave it out, Excel sums the
rangeitself.
Example 1: total by category. Sales region in column A, amount in column B. Total the East region:
=SUMIF(A2:A100,"East",B2:B100)
Excel checks column A for "East" and sums the matching amounts in column B.
Example 2: reference the criteria from a cell. Hard-coding "East" is fragile. Put the region in cell D1 and point to it:
=SUMIF(A2:A100,D1,B2:B100)
Now you can change D1 to "West" and the total updates. This is how you build a one-cell category selector.
Example 3: number conditions. Criteria can be comparisons, written as text in quotes:
=SUMIF(B2:B100,">1000")
totals every value over 1,000. Note there's no sum_range here — we're summing the same column we're testing. Combine the operator with a cell reference like this: =SUMIF(B2:B100,">"&D1).
Example 4: wildcards. Use * (any characters) and ? (one character) for partial text matches:
=SUMIF(A2:A100,"North*",B2:B100)
totals every region starting with "North" (North, Northeast, etc.).
Common mistakes.
- Mismatched range sizes.
rangeandsum_rangeshould be the same shape; misaligned ranges give wrong totals. - Forgetting quotes on operators.
">1000"must be in quotes, including when joined to a cell:">"&D1. - Extra spaces in data. "East " won't match "East." Clean with
TRIMif needed.
When to upgrade to SUMIFS. SUMIF handles one condition. The moment you need two — East region and June — switch to SUMIFS, which takes multiple range/criteria pairs. We cover that in a dedicated guide.
Related: How to Use SUMIFS for Multiple Conditions · 10 Excel Formulas Every Small Business Owner Should Know