How to use SUMIF in Excel
SUMIF adds only the values that meet one condition — sales for one region, costs of one category, hours of one person.
Syntax
=SUMIF(range, criteria, [sum_range])
range | The cells to test against the criteria. |
criteria | The condition: a value ("North"), a cell (E2) or a comparison in quotes (">1000"). |
[sum_range] | The cells to add. If omitted, range itself is added. |
Examples
=SUMIF(A2:A100, "North", C2:C100)Total sales for North.=SUMIF(A2:A100, E2, C2:C100)Same, with the region in a cell — change E2 to switch.=SUMIF(C2:C100, ">1000")Sum of amounts above 1000.=SUMIF(B2:B100, "*phone*", C2:C100)Wildcards: any product containing "phone".SUMIF with dates
Put the comparison in quotes and join it to the date with &. Build the date with DATE or point to a cell: a date typed into the text of the criteria is easy to get wrong.
=SUMIF(A2:A100, ">="&DATE(2026,1,1), C2:C100)Sales from 1 January 2026 onwards.=SUMIF(A2:A100, "<"&F1, C2:C100)Sales before the date in F1.A summary table from one formula
Point the criteria at a cell and copy the formula down next to a list of regions. Lock the ranges with $ so they stay in place.
=SUMIF($A$2:$A$100, F2, $C$2:$C$100)The total for the region in F2. Copy it down for F3, F4 and so on.Blanks, non-blanks and "everything except"
Special criteria cover the cases that come up in every reconciliation.
=SUMIF(B2:B100, "", C2:C100)Amounts that have no category yet.=SUMIF(B2:B100, "<>", C2:C100)Amounts that do have a category.=SUMIF(B2:B100, "<>Refund", C2:C100)Everything except refunds.Common mistakes
- Comparison with a cell
">E2"is treated as text. Join it:">"&E2.- Ranges of different sizes
rangeandsum_rangeshould cover the same rows, otherwise the results shift.- Several conditions
- SUMIF takes only one. Use SUMIFS.
Frequently asked questions
What's the difference between SUMIF and SUMIFS?
SUMIF takes one condition, SUMIFS up to 127. The arguments are in a different order too: in SUMIF the sum range comes last, in SUMIFS it comes first.
Why does SUMIF return 0?
Nothing matches the criteria exactly: extra spaces in the data, numbers stored as text, or a comparison written as ">F1" instead of ">"&F1.
Is SUMIF case-sensitive?
No. "north", "North" and "NORTH" are the same to SUMIF. For a case-sensitive total, use SUMPRODUCT with EXACT.
Can SUMIF use wildcards?
Yes: * stands for any number of characters and ? for exactly one. =SUMIF(B2:B100, "*phone*", C2:C100) adds every product with "phone" anywhere in its name.
Available in: All versions of Excel, Excel for the web, Google Sheets