How to use SUMIF and SUMIFS in Excel
SUMIF adds the numbers in a range that meet a condition: total sales for one region, expenses above a limit. SUMIFS does the same with several conditions at once.
Syntax
=SUMIF(range, criteria, sum_range)
=SUMIFS(sum_range, criteria_range1, criteria1, ...)
range / criteria_range- The cells to test, such as the Region column.
criteria- The condition:
"West",F2,">1000". sum_range- The numbers to add. Note it comes last in SUMIF but first in SUMIFS.
Try it now · free, no sign-up
Total sales by region and product
- In G2, total the Amount for the region in F2.
- In G3, total only Laptop sales in the West.
- In G4, add up all orders over $1,000.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Rep | Region | Product | Amount | Region | Total | |
| 2 | Ashley | West | Laptop | 1,200.00 | West | ||
| 3 | Brian | East | Monitor | 300.00 | |||
| 4 | Ashley | East | Laptop | 1,150.00 | |||
| 5 | Daniel | South | Keyboard | 80.00 | |||
| 6 | Brian | West | Laptop | 1,300.00 | |||
| 7 | Daniel | East | Monitor | 320.00 | |||
| 8 | Ashley | West | Keyboard | 75.00 | |||
| 9 | Brian | South | Laptop | 1,250.00 |
Loading the live spreadsheet…
Writing conditions
Text goes in quotes: "West". A comparison goes in quotes too: ">1000", "<>East" (not East). To compare with a cell, join it on: ">"&F5. Wildcards work for text: "Lap*" matches anything starting with Lap.
SUMIF vs SUMIFS
SUMIFS handles one condition just as well, so many people use it for everything to avoid remembering two argument orders. In tests, use whichever the question names.
Common mistakes
- Arguments in the wrong order
- SUMIF is (range, criteria, sum_range); SUMIFS is (sum_range, range, criteria, ...). Mixing them up gives 0 or a #VALUE! error.
- No quotes around a comparison
=SUMIF(D2:D9,>1000)is an error. Write">1000".- Ranges of different sizes
- In SUMIFS every range must have the same number of rows, or you get #VALUE!.
Practice it until it sticks
ExcelFluent has 42 hands-on lessons, from SUM to XLOOKUP, plus 5 real work projects and a final challenge that uses everything. Every answer is checked instantly. The first 5 lessons and 1 work project (an invoice with tax) are free.
Start the free lessons → Open the full SUMIF & SUMIFS lessonFrequently asked questions
Can SUMIF use OR logic?
Not directly. Add two SUMIFs together: =SUMIF(B2:B9,"West",D2:D9)+SUMIF(B2:B9,"East",D2:D9).
How do I sum between two dates?
Use SUMIFS with two conditions on the date column: ">="&start and "<="&end.
Why does SUMIF return 0?
Usually the criteria do not match exactly (extra spaces, a typo) or the numbers are stored as text.