How to use SUMIF in Google Sheets
Learn how to use the SUMIF function in Google Sheets to total values that meet a specific condition, with syntax and real examples.

Quick answer
To use SUMIF in Google Sheets, click an empty cell and type =SUMIF(range, criterion, sum_range), then press Enter. The range is where Sheets checks your condition, criterion defines what to match, and sum_range is the numbers to add. For example, =SUMIF(A2:A10,"Fruit",B2:B10) totals values in column B where column A equals Fruit.
Steps at a glance
- Click an empty cell where you want the total to appear
- Type =SUMIF( to start the formula
- Enter the range Sheets should check for your condition
- Add your criterion in quotes or as a cell reference
- Enter the sum_range containing the numbers to add
- Close the parentheses and press Enter
- Copy the formula to other cells if needed
Summary
SUMIF is a Google Sheets function that adds up numbers only when a related cell meets a condition you set, like matching a specific word, number, or date. Instead of manually adding filtered rows, you get an instant conditional total that updates automatically as your data changes.
Step-by-step guide
Step 1
Organize your data into clear columns
Make sure your spreadsheet has one column with the values you'll match against (like a category or name) and another column with the numbers you want to total. Keep headers in the first row so the ranges you select later are easy to identify.
Step 2
Click the cell for your result
Select an empty cell, usually near the bottom of your data or in a separate summary area, where you want the conditional total to display. This is where you'll build your formula.
Step 3
Start the SUMIF formula
Type =SUMIF( into the cell. Google Sheets will show a small syntax hint below the cell confirming the three arguments you need: range, criterion, and sum_range.
Step 4
Define the range to check
Enter the range of cells containing the values you want to test, such as A2:A10. This is the column Sheets scans to decide which rows match your condition.
Step 5
Set your criterion
Add a comma, then type the condition in quotation marks, like "Fruit", or reference a cell containing the criterion, such as D1. You can also use comparison operators like ">100" or "<>Closed" for numeric or text conditions.
Step 6
Enter the sum range and close the formula
Add another comma, then select the range of numbers you want added, such as B2:B10. Close the parentheses and press Enter to see your conditional total appear.
Step 7
Copy the formula for other conditions
Drag the fill handle or paste the formula into adjacent cells to calculate totals for different criteria. If you're building a full breakdown, consider pairing this with a chart to visualize the results, similar to how you'd add a legend to a chart in Sheets.
Why this matters
You're staring at a sales log with hundreds of rows and need to know total revenue from just one region or product without manually filtering and adding rows. SUMIF gives you that answer instantly, and it keeps recalculating automatically whenever your data updates.
Frequently asked questions
What is the difference between SUMIF and SUMIFS?
SUMIF evaluates only one condition, while SUMIFS can test multiple conditions at once. If you only need to sum based on a single criterion, SUMIF is simpler to write and read.
Can I use SUMIF with dates?
Yes. You can use criteria like ">1/1/2024" to sum values after a specific date, or reference a cell containing a date. Make sure the date column is formatted consistently as dates, not text.
Can the criterion be a partial text match?
Yes, SUMIF supports wildcards. Use an asterisk, like "Fruit*", to match any text starting with 'Fruit', which is useful when entries have slight variations.
Does SUMIF work across multiple sheets?
Yes, as long as you reference the correct sheet name in your range and sum_range, such as Sheet2!A2:A10. For pulling data from an entirely different spreadsheet file, you'd use IMPORTRANGE alongside SUMIF.
Create interactive demos like this one — free, no coding required.
Start for free →