How to Use SUMIF in Google Sheets

By Tomosuke Hasegawa · Updated Oct 29, 2026 · Beginner · 7 min read · includes 2 free exercises

In short: SUMIF adds up the numbers in a range, but only for the rows that meet one condition. For example, it can total the sales of one region. The formula is =SUMIF(range, criterion, [sum_range]).

What SUMIF does

SUM adds every number in a range. SUMIF adds only the numbers that meet a test you set. You use it when a table has a label column (region, product, status) and a number column (sales, hours, cost), and you want a total for one label.

SUMIF syntax

=SUMIF(range, criterion, [sum_range])

SUMIF supports one criterion. To test several conditions at once, use SUMIFS.

A step-by-step example

Here is a small sales table in cells A1:C7.

ABC
1RegionProductSales
2EastNotebook120
3WestPen45
4EastPen60
5NorthNotebook80
6WestNotebook150
7EastBackpack200

To total the sales for the West region:

=SUMIF(A2:A7, "West", C2:C7)

This returns 195. Here is why:

  1. Sheets checks each cell in A2:A7 and finds the ones equal to "West". These are rows 3 and 6.
  2. For those rows, it takes the matching cells from C2:C7, which are 45 and 150.
  3. It adds them: 45 + 150 = 195.

Text criteria go in quotation marks. Keep the range and the sum range the same size, so each row lines up.

Use comparison operators

For numbers, you can put an operator in front of the value inside the quotation marks. To add only the sales that are greater than 100:

=SUMIF(C2:C7, ">100")

This returns 470 (120 + 150 + 200). There is no third argument, so SUMIF adds the cells it tested.

Google's help page lists these operators: = (equal), > (greater than) and < (less than). You can also combine them, as in ">=" and "<=".

To compare with a value in a cell, join the operator and the cell reference with an ampersand. If E1 holds 100, then =SUMIF(C2:C7, ">"&E1) gives the same result.

Use wildcards for partial matches

In a text criterion, ? matches any single character and * matches any run of characters (including none). To total every sale whose product starts with "Note":

=SUMIF(B2:B7, "Note*", C2:C7)

This returns 350 (120 + 80 + 150). To match a literal question mark or asterisk, put a tilde in front of it, as in "~?".

Common SUMIF mistakes

Try it yourself

Use the sales table above (A1:C7). Type your formula into the box, starting with =, then press Check.

Exercise 1: Total for one region

Write a formula that returns the total Sales (column C) for the East region (column A).

Hint: test A2:A7 against "East", and add up C2:C7.

Exercise 2: Add only large sales

Write a formula that adds up only the Sales values (column C) that are greater than 100.

Hint: the criterion is the text ">100". You can leave out the third argument.

What to learn next

Syntax and criterion rules in this guide were checked against Google's SUMIF help page. See all guides.