Category: FUNCTION | Updated: 2026-11-22
How to Use the SUMIF Function in Google Sheets | Sum Numbers Matching a Single Criterion
How to Use the SUMIF Function
The SUMIF function is a math function that searches for cells matching a single specified criterion and sums the corresponding numeric values.
Syntax
=SUMIF(range, criterion, [sum_range])
- range: The cell range to evaluate against the criterion, such as
B2:B20(required). - criterion: The condition used to filter which rows to sum (text, number, comparison operator, cell reference, etc.) (required).
- sum_range: The cell range containing the actual numbers to sum, such as
C2:C20. If omitted,rangeitself is summed (optional).
Table Example
Here is an example of calculating only the total "Travel" expenses from the expense report below.
| Row | Column A (Date) | Column B (Category) | Column C (Amount) |
|---|---|---|---|
| 1 | Date | Category | Amount |
| 2 | 2026/11/01 | Travel | 1,200 |
| 3 | 2026/11/02 | Supplies | 3,500 |
| 4 | 2026/11/03 | Travel | 2,400 |
| 5 | 2026/11/04 | Meetings | 4,800 |
| 6 | 2026/11/05 | Travel | 850 |
- Formula:
=SUMIF(B2:B6, "Travel", C2:C6) - Result:
4,450(1,200 + 2,400 + 850)
Common Errors and Notes
- Row misalignment between
rangeandsum_range: IfrangeisB2:B6butsum_rangestarts on a different row likeC1:C6, values from the wrong rows will be summed, skewing the result. Always align the start and end rows. - Argument order difference from
SUMIFS: InSUMIF, the order isrange → criterion → sum_range, whereas inSUMIFS(for multiple criteria),sum_rangecomes first (1st argument). Pay attention to the order when switching between them. - Numbers stored as text: If the numbers in
sum_rangeare formatted as text (often left-aligned), they will not be added to the total even when the row matches, resulting in0.
Frequently Asked Questions
Q. What happens if I omit the 3rd argument (sum_range) in SUMIF?
A. If the 3rd argument is omitted, the "range" specified in the 1st argument itself is summed. For example, "=SUMIF(B2:B10, \">=1000\")" sums only the numbers in B2:B10 that are 1,000 or greater.
Q. How do I sum data that does NOT match specific text (not equal) in SUMIF?
A. Use the "<>" comparison operator, such as "<>Cancelled". This sums the values for all items except "Cancelled".