What SUMIF does
SUMIF adds values that match one condition. It is a useful step up from SUM when you need totals for a subset such as one category, one customer, one month, or one region.
Practical examples
Sum sales for one category
=SUMIF($A$2:$A$20,"Hardware",$B$2:$B$20)
Excel checks the labels in column A and adds the matching amounts from column B.
Use a cell as the condition
=SUMIF($A$2:$A$20,E2,$B$2:$B$20)
This makes the formula reusable because the criteria can change without rewriting it.
Common mistakes and notes
SUMIF handles one condition
If you need multiple conditions, use SUMIFS.
Criteria syntax matters
Text criteria usually go in quotes. Operators such as ">100" also belong inside quotes unless they are joined with a cell reference.