SUMIF(range, criterion, [sum_range])One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
range:
The range of cells that you want to evaluate for the specified criteria.
criteria:
The condition or value that you want to count occurrences of within the specified range. This can be a number, text, expression, or a cell reference that defines which cells will be counted.
sum_range:
The actual cells to sum if the corresponding cells in the range meet the specified criteria. If omitted, Google Sheets sums the cells in the range itself.
The SUMIF function in Google Sheets is a useful tool that allows you to sum values based on a specific condition or criteria. This function is particularly helpful when you want to aggregate data selectively, making it easier to analyze and interpret your datasets. Unlike the basic SUM function, which adds all values in a range, SUMIF lets you focus on specific entries that meet your defined criteria.
In simpler terms, SUMIF helps you calculate the total of a range of numbers while applying a filter to include only those numbers that meet certain conditions.
Imagine you are managing a sales report for a small business, and you want to calculate the total sales for a specific product:
| Product | Amount |
|---|---|
| Widget A | 100 |
| Widget B | 150 |
| Widget A | 200 |
| Widget C | 300 |
| Widget B | 100 |
You want to find the total sales amount for "Widget A".
To achieve this, you would use the SUMIF function as follows:
=SUMIF(A2:A6, "Widget A", B2:B6)In this formula:
A2:A6 is the range where the function will look for the product names."Widget A" is the criteria that specifies which product's sales you want to sum.B2:B6 is the range from which the function will sum the corresponding amounts.When you apply the SUMIF formula to the Sales Table, the output would be:
Total Sales for Widget A: 300This result indicates that the total sales amount for "Widget A" is 300, which is the sum of the two entries (100 + 200).
SUMIF is beneficial because it simplifies the process of aggregating data based on specific criteria. It allows you to focus on relevant data points without manually filtering or sorting your dataset. This function is especially useful for financial analysis, inventory management, and any scenario where conditional summation is required.
SUMIF is an essential function for anyone working with data in Google Sheets, providing a powerful way to enhance data analysis and reporting capabilities.
Happy spreadsheeting!
You have a sales data table where Column A lists product categories and Column B shows sales amounts. You can use the SUMIF formula to calculate total sales for a specific category, enabling quick analysis of performance by category without manual summation.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.