Here’s how to use SUMIF in Google Sheets to quickly filter spreadsheet entries while keeping your information organized.
What Is the SUMIF Function in Google Sheets?
You’ll use the SUMIF function if you have a spreadsheet with numerical values but only want to add together some of them. For example, if you have a list of items you’ve purchased and see how much you’ve spent on each kind of item, SUMIF can do that for you automatically. It’s possible to just use the SUM function to accomplish this task, but to do that, you need to enter a formula that points to each cell containing a value you want to include. SUMIF lets you write a single formula that looks at the entire set of data and only pick out the ones you want to add together. The function does the parsing for you to save you time. You can also continue adding to your data, and as long as the cells you use still fall into the range SUMIF uses, you don’t have to change the formula to keep it current.
Syntax of the SUMIF Function
The SUMIF function has two or three parts, which follow the command =SUMIF. You enter them in this order, with commas between them:
How to Use the SUMIF Function in Google Sheets
This example uses a sample spreadsheet with the prices of various office supplies. Here’s how to set up SUMIF.
Criteria and Other Uses for the SUMIF Function
Even though you can only use a single filter for each SUMIF function, it has plenty of practical uses. You can use a variety of different conditions for the criterion. The following table contains some of the symbols you can use for SUMIF and what they mean. The final formula for this cell, which calculates the total cost of pencils, is: The function can also use the wildcard symbol () to pull partial matches. In the example spreadsheet, you could add up just the money for writing implements by using the criterion pen, which would pull the results of both pens and pencils. Criteria can also include cell references. This version of SUMIF is handy if you have a comparative value that might change. For example, you could type 50 into cell B5 and have the function refer to that cell (e.g., >B5), and then change the value in the cell to get different results without having to change the SUMIF function itself.