How to Use SUMIF in Excel (and SUMIFS)

SUMIF adds up the cells that meet one condition. The syntax is =SUMIF(range, criteria, sum_range) — so =SUMIF(A2:A100, "North", B2:B100) totals column B for every row where column A says “North”. When you need more than one condition, use SUMIFS.

The three arguments

ArgumentWhat it isExample
rangeThe cells to checkA2:A100
criteriaWhat to match"North"
sum_rangeThe cells to add upB2:B100

If you leave out sum_range, Excel sums the range itself — handy when the condition and the numbers are in the same column.

Example: total sales by region

Say column A holds regions and column B holds sales:

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

That returns the total of every North sale. Change "North" to "South" and you have the next region — build a small table and fill it down.

Using operators and cell references

Criteria can be more than plain text:

To matchWrite the criteria as
Exactly “North”"North"
Greater than 500">500"
Not blank"<>"
A value in another cell">"&E2
Text ending in “west”"*west"

Referencing a cell (">"&E2) is the trick that makes a summary table driven entirely by inputs.

SUMIFS: several conditions at once

SUMIFS puts sum_range first, then pairs each condition with its range:

=SUMIFS(B2:B100, A2:A100, "North", C2:C100, "Q1")

This totals column B where column A is “North” and column C is “Q1”. Add more range/criteria pairs for more conditions — up to 127.

Note the order swap: SUMIF = range first, SUMIFS = sum_range first. Mixing them up is the most common SUMIF error.

Common mistakes

ProblemFix
Wrong totalCheck the ranges are the same size; A2:A100 needs B2:B100, not B2:B50
#VALUE!A range is text where numbers were expected, or sizes mismatch
Criteria ignoredLook for stray spaces, and make sure it’s in quotes
0 instead of a totalThe criteria never matches — test it in a spare cell
Only part summedThe range ends before the data does

SUMIF vs. its cousins

FormulaUse it for
SUMAdd everything
SUMIFAdd where one condition is true
SUMIFSAdd where several conditions are true
COUNTIF / COUNTIFSCount matching rows instead of adding
AVERAGEIF / AVERAGEIFSAverage matching rows

Once your totals are correct, make a graph in Excel to show them, or feed the figures into a pivot table for a deeper breakdown. If you’re building a lookup instead of a total, see how to use VLOOKUP in Excel.

FAQ

What does SUMIF do in Excel?

It adds up the cells in one range that match a single condition you specify. =SUMIF(A:A,"North",B:B) totals B wherever A is “North”.

What’s the difference between SUMIF and SUMIFS?

SUMIF takes one condition; SUMIFS takes several. SUMIFS also lists the sum range first, then each criteria range and value.

How do I SUMIF with a “greater than” condition?

Put the operator inside the quotes and concatenate a cell: =SUMIF(B2:B100, ">500") or =SUMIF(B2:B100, ">"&E2).

Why is my SUMIF returning 0?

The criteria isn’t matching — often a trailing space, a number stored as text, or a case/format difference. Test the exact value in a spare cell first.

Can I use SUMIF across two sheets?

Yes — reference the other sheet in the range, e.g. =SUMIF(Sheet2!A:A,"North",Sheet2!B:B).