Syntax
| Parameter | Description |
|---|---|
| range | Parameter of the SUMIF function. |
| criteria | Parameter of the SUMIF function. |
| [sum_range] | (Optional.) Parameter of the SUMIF function. |
Examples
| A | B | C | |
|---|---|---|---|
| 1 | Region | Rep | Sales |
| 2 | West | Alice | 12000 |
| 3 | East | Bob | 8500 |
| 4 | West | Carol | 15200 |
| 5 | East | Dave | 9300 |
| 6 | West | Eve | 18000 |
Sum sales for one region
=SUMIF(A2:A100, "West", C2:C100)
Sum values above a threshold
=SUMIF(B2:B50, ">1000", B2:B50)
Sum expenses for a category
=SUMIF(A2:A200, "Marketing", B2:B200)
Common Errors
The range and sum_range are different sizes. They must have the same number of rows (or columns).
The criteria does not match any cells. Check for trailing spaces or mismatched text. Try using wildcards.
Tips
Reference a cell for dynamic criteria: =SUMIF(A:A, F1, C:C) where F1 contains the region name.
Use * and ? in criteria: =SUMIF(A:A, "Mar*", B:B) sums all rows starting with "Mar" (Marketing, March, etc).
If the criteria range and sum range are the same, you can omit the third argument: =SUMIF(B:B, ">100").
Try SUMIF in Viztab
Import your data and use SUMIF with 370+ other formulas. No signup required.
Open Viztab