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, range itself 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 range and sum_range: If range is B2:B6 but sum_range starts on a different row like C1:C6, values from the wrong rows will be summed, skewing the result. Always align the start and end rows.
  • Argument order difference from SUMIFS: In SUMIF, the order is range → criterion → sum_range, whereas in SUMIFS (for multiple criteria), sum_range comes first (1st argument). Pay attention to the order when switching between them.
  • Numbers stored as text: If the numbers in sum_range are formatted as text (often left-aligned), they will not be added to the total even when the row matches, resulting in 0.

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".