Yes. SUMIF works in Google Sheets and adds values that meet one condition, such as totaling expenses labeled “Travel” or sales above a chosen amount. Its basic syntax is =SUMIF(range, criterion, [sum_range]); the square brackets indicate that the last argument is optional.
What SUMIF Does in Google Sheets
SUMIF is a conditional-summing function: it checks each cell in a range against a criterion and adds the corresponding value when the condition is met. It is useful when a list contains categories, dates, names, or numeric values and you need a total for just one group. For example, a budget can use it to total all entries marked “Groceries” without filtering or manually adding those rows.
The function is available in Google Sheets and can be entered directly into a cell in a browser. It recalculates when the source data changes, so adding a new qualifying transaction can update the result automatically if the formula’s ranges include the new row. SUMIF is not limited to financial data: it can total hours by employee, quantities by product, or points by team.
One important distinction is that SUMIF handles one condition. If you need to require two or more conditions at the same time—for example, category equals “Travel” and month equals January—SUMIFS is generally the more suitable function.
SUMIF Syntax and Its Three Arguments
The syntax is =SUMIF(range, criterion, [sum_range]). The first argument, range, is the cells Sheets checks. Criterion is the condition to test. The optional sum_range contains the values to add; when you leave it out, Sheets adds the qualifying cells in range itself.
For example, if column A contains expense categories and column B contains their amounts, the function checks column A and adds the matching cells from column B. Keep the criteria range and sum range aligned row by row and preferably the same size. If the ranges start on different rows or cover different numbers of rows, it is easy to pair a label with the wrong value or get an unexpected total.
The criterion can be a text value, a number, a comparison such as “greater than 100,” or a reference to a cell containing the condition. Text criteria are not case-sensitive in ordinary matching: “travel” and “Travel” match the same text. The function does not change the underlying data; it returns a calculated total in the cell where you put the formula.
A Worked Example: Total a Category
Suppose A2:A7 contains the labels Supplies, Travel, Travel, Meals, Travel, and Supplies, while B2:B7 contains 45, 120, 85, 32, 200, and 18. To total only the Travel expenses, use the following formula. With those labels in A2:A7 and amounts in B2:B7, enter:
=SUMIF(A2:A7,"Travel",B2:B7)
The result is 405: the matching amounts are 120, 85, and 200, and 120 + 85 + 200 = 405. The first range is where Sheets looks for the word Travel; the third argument tells it to add the corresponding cells in column B.
If the values you want to add are in the same range you are checking, omit sum_range. For instance, with scores in C2:C20 and a threshold in D1, this formula totals scores greater than 80. With the scores in C2:C20, enter:
=SUMIF(C2:C20,">80")
Because no separate sum_range is supplied, Sheets adds the qualifying numbers from C2:C20. For a condition stored in a cell, you can refer to that cell instead of typing the text directly. With categories in A2:A20, amounts in B2:B20, and the desired category in E2, enter:
=SUMIF(A2:A20,E2,B2:B20)
This setup makes the result easy to reuse: change E2 to another category and the formula calculates that category’s total.
Text, Number, and Wildcard Criteria
For exact text matching, put the text criterion in double quotes inside the formula. A numeric criterion can be written as a number or as a comparison. Comparison operators such as greater than (>), less than (<), greater than or equal to (>=), and not equal to (<>) are written as part of a quoted criterion. For example, “>100” tells Sheets to match values above 100, not values equal to 100.
When the comparison value is in a cell, join the operator and cell reference with an ampersand. With amounts in B2:B20 and a cutoff value in D1, enter:
=SUMIF(B2:B20,">"&D1)
That formula checks and sums the amounts in B2:B20 that are greater than the value in D1. If the criterion is in a separate range from the values to add, specify both ranges as in the category example.
Text criteria can also use wildcards. An asterisk (*) matches any number of characters, while a question mark (?) matches one character. A tilde (~) lets you search for a literal wildcard character rather than use it as a pattern. With product names in A2:A30 and sales amounts in B2:B30, this formula adds sales for names beginning with “North”:
=SUMIF(A2:A30,"North*",B2:B30)
Wildcards are useful for grouping variations such as “North Store” and “North Outlet,” but they can also match more entries than intended. Check the labels in the source range if a wildcard-based total seems too large.
Using SUMIF with Dates
Dates can be criteria too, as long as the cells contain real date values rather than text that merely looks like a date. For an exact date, use a date value in the criterion. With dates in A2:A20 and amounts in B2:B20, this formula totals the entries dated January 1, 2026:
=SUMIF(A2:A20,DATE(2026,1,1),B2:B20)
For a date range, use SUMIFS with a start-date condition and an end-date condition, or combine appropriate date criteria in another method. SUMIF alone accepts only one condition, so it cannot by itself express both “on or after January 1” and “before February 1” as two separate tests. If dates include times, an exact-date match may not include every time-stamped entry on that calendar day; a bounded date range is usually more reliable.
How a date is displayed depends on the cell’s number format, but formatting does not determine whether the underlying value is a usable date. If a date criterion returns zero unexpectedly, check whether the source dates are stored as text and whether the cells include time values.
Common SUMIF Problems and How to Fix Them
A zero result does not always mean the function is broken. Often, the criterion does not exactly match the stored values, or the formula is checking the wrong column. Inspect a few source cells and confirm that the criteria range contains the labels or numbers you meant to test, while the sum range contains the values you meant to add.
- Text that looks alike but differs: A trailing space, an extra character, or inconsistent labels can prevent an exact match. Clean or standardize the source data, or use a wildcard only when a partial match is truly intended.
- Numbers stored as text: A cell that looks numeric may be text, which can affect comparisons and addition. Check the source values and convert them to numbers when appropriate.
- Misaligned ranges: Make sure each checked row corresponds to the value being summed. For example, a category in A5 should pair with its amount in B5.
- Missing quotation marks or punctuation: Text criteria and comparison expressions need the right quotation marks and separators. A formula parse error usually points to a syntax issue.
- Locale differences: Google Sheets’ spreadsheet locale can affect formula separators and date conventions. The examples here use commas; if Sheets rejects a formula, check the file’s locale and use the separator expected by that sheet.
Also check whether the formula’s ranges cover all the data. A formula ending at row 20 will not include a new entry in row 21. You can extend the ranges or use open-ended column ranges, such as A2:A and B2:B, when that fits the sheet. Open-ended ranges are convenient, though very large sheets with many complex formulas may calculate more efficiently with bounded ranges.
SUMIF vs. SUMIFS
Choose SUMIF when one condition is enough. Choose SUMIFS when every required condition must be met, such as totaling Travel expenses for one employee or sales for a particular product during a specific period. SUMIFS places the sum range first, followed by pairs of criteria ranges and criteria, so its argument order differs from SUMIF.
For instance, imagine categories in A2:A100, dates in B2:B100, and amounts in C2:C100. A SUMIFS formula can add amounts where the category is Travel and the date is on or after January 1, 2026. With those columns as described, enter:
=SUMIFS(C2:C100,A2:A100,"Travel",B2:B100,">="&DATE(2026,1,1))
This example applies two tests and adds values from column C only when both tests are satisfied. For a second date boundary, add another date-range and criterion pair. If the task is instead to add entries that meet either of two alternative labels, the logic is different: you may need multiple SUMIF calculations or another approach, because multiple SUMIFS criteria are combined as “and,” not “or.”
Alternatives and Practical Tips
SUMIF is often the clearest choice for a simple total. SUMIFS is the natural next step for multiple simultaneous conditions. A pivot table can be more useful when you want an interactive summary across several categories without writing a separate formula for every total. Filtering a table and calculating a subtotal may also suit one-off inspection, but it is less convenient when you want a persistent category total that updates in a report.
For a dependable setup, keep one type of information in each column, use consistent category labels, include headers above the data, and place summary formulas outside the source range where possible. Test a formula on a small set of rows whose expected total you can calculate by hand. Once the result is right, expand the ranges and consider putting changeable criteria in cells so other people can use the summary without editing the formula.
Google Sheets uses the same basic SUMIF argument pattern found in Excel, so a straightforward formula can often be moved between the two programs. Differences in locale settings, separators, or date handling can still affect a copied formula. In Google Sheets, check the spreadsheet’s locale if a formula written with commas or a particular date convention is not accepted.
Frequently Asked Questions
Is SUMIF available in Google Sheets?
Yes. SUMIF is a built-in Google Sheets function. Enter it in a cell or in the formula bar to total values that meet one condition.
Can SUMIF use more than one condition?
No. SUMIF evaluates one criterion. Use SUMIFS when you need multiple conditions to be true for a value to be included.
Why does SUMIF return 0 when there are matching rows?
Check that the criterion matches the source cells, the criteria range points to the correct column, and the sum range contains numeric values aligned with those rows. Extra spaces, text-formatted numbers, and dates stored as text are common causes.
Can SUMIF match part of a word?
Yes. Use an asterisk for any number of characters or a question mark for one character. For example, a criterion such as “North*” matches text beginning with North. Wildcards can include unintended labels, so review the matches.
Does SUMIF work in Excel too?
Yes. Excel also supports SUMIF with the same general argument order. When moving formulas between Excel and Sheets, check locale-specific separators and date conventions if the copied formula does not calculate as expected.
Related
- Excel Time to Number: Convert Hours, Minutes, and Seconds
- Excel Time Zones: How Date and Time Conversion Works
- Excel Text Across Cells Without Merging
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Cell Height Limit: Maximum Row Height ExplainedIn Excel for Microsoft 365 on Windows, the maximum row height—and therefore the height of every cell in…
- How to Move Freeze Panes in Excel to Different RowsTo move frozen rows or columns in Excel, first choose View > Freeze Panes > Unfreeze Panes. Then…
- Present PowerPoint in Teams With Speaker NotesTo present PowerPoint in Teams while keeping your speaker notes to yourself, open the meeting, select Share, and…
- Inventory Spreadsheets: Best Practices That Prevent ErrorsGood inventory spreadsheets use one row per item, a unique identifier for each item, consistent fields, and a…
- How to Archive Emails by Date Range in OutlookTo archive Outlook emails from a particular date range, search for messages received within the dates, check the…
- How to Set Up Out of Office Automatic Replies in OutlookTo set up an out-of-office reply in Outlook, open Automatic Replies, turn them on, choose when they should…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.