How do I use SUMIF in Excel?
Use SUMIF when you want to sum only the values that match a condition. Enter Range, Criteria, Sum range in that order, then add optional arguments when needed.
Sums values that meet a condition.
SUMIF(range, criteria, [sum_range])range
RequiredSpecify the range used for condition check or aggregation.
criteria
RequiredEnter the match condition, e.g. "Food", ">=80", "<>0".
sum_range
OptionalSpecify the range of values to sum.
Use SUMIF to aggregate Sales in column D where Category matches Food. You can set ranges by dragging from the start cell to the end cell in the same argument field.
| # | AProduct ID | BProduct Name | CCategory | DSales |
|---|---|---|---|---|
| 2 | P001 | Apple | Food | 1200 |
| 3 | P002 | Banana | Food | 980 |
| 4 | P003 | Notebook | Stationery | 450 |
| 5 | P004 | Pen | Stationery | 300 |
| 6 | P005 | Grapes | Food | 1500 |
| 7 | P006 | Ruler | Stationery | 250 |
| 8 | P007 | Peach | Food | 860 |
How to Use (Formula)
=SUMIF(C2:C8, "Food", D2:D8)Result
4540
Use SUMIF when you want to sum only the values that match a condition. Enter Range, Criteria, Sum range in that order, then add optional arguments when needed.
Use the "Start Function Practice" button to jump straight into SUMIF drills.
The main arguments are Range, Criteria, Sum range. Start with the required ones, then add optional arguments if needed.