How to Use SUMIF in Google Sheets
SUMIF adds up numbers that meet a condition. The syntax is =SUMIF(range, criterion, sum_range) — for example, total sales for one region. Here is exactly how each part works, with examples.
SUMIF adds up only the numbers that meet a condition you set — like totaling the sales for one region, or adding only the expenses over a certain amount. It is one of the most useful functions in Google Sheets once your data grows past a simple list.
The SUMIF syntax, explained
=SUMIF(range, criterion, [sum_range])
| Part | Meaning |
|---|---|
| range | The cells to test against your condition |
| criterion | The condition to match, like "North" or ">100" |
| sum_range | The cells to add up (optional — if left out, SUMIF adds the range itself) |
A real example
Say column A has regions and column B has sales. To total the sales for the North region:
=SUMIF(A2:A100, "North", B2:B100)
This checks A2:A100 for "North" and adds the matching values from B2:B100. Wrap text criteria in quotation marks. You can also test numbers — =SUMIF(B2:B100, ">100") adds every value over 100.
More than one condition: SUMIFS
When you need two or more conditions — say North region AND sales over 100 — use SUMIFS, which puts the sum range first:
=SUMIFS(B2:B100, A2:A100, "North", B2:B100, ">100")
SUMIF pairs well with a decision function — combine it with an IF function for more complex logic, or turn the totals into a graph in Google Sheets to see them at a glance.
Frequently asked questions
What is the difference between SUMIF and SUMIFS?
SUMIF adds values that meet one condition, with the sum range last. SUMIFS handles several conditions at once and puts the sum range first. Use SUMIF for a single test and SUMIFS when two or more must all be true.
How do I use SUMIF with a greater-than condition?
Put the operator and number in quotation marks as the criterion, like =SUMIF(B2:B100, ">100"). You can do the same with <, >=, and <= — for example ">=50" adds every value of 50 or more.
Why is my SUMIF returning 0?
Usually the criterion does not match — a trailing space, different text, or numbers stored as text. Check that the range and criterion line up, and that "North" in the data exactly matches the "North" in your formula.