Skip to main content

Hey there! Free trials are available for Standard and Essentials plans. Start for free today.

SUMIF in Google Sheets

Unlock the full potential of Google Sheets with our comprehensive guide to mastering SUMIF. Learn how to efficiently analyze and summarize data with this function.

Using Google Sheets in business can help you organize and categorize data. Unfortunately, many people don't realize the possibilities of their spreadsheets. Google Sheets lets you use functions that improve efficiency and productivity while keeping data accurate, up-to-date, and organized properly.

One of the most popular Google Sheets functions is SUMIF, which can help you summarize and categorize data. In addition, the SUMIF function can help you conditionally add cells in spreadsheets.

Learning SUMIF is crucial for anyone working with large datasets because it can help them save time while improving the accuracy of their data to determine statistical significance and make better decisions.

In this article, we'll discuss everything you need to know about the SUMIF function in Google Sheets, including what it is, how it works, and how to use it to organize data. Let's get started.

SUMIF essentially stands for "SUM" and "IF. It's like the sum function in that you find the sum of cells. However, unlike the sum function, the SUMIF function calculates the sum based on a number, cell reference, logical operators, or text criteria.

Ultimately, you're finding the sum of cells if a certain condition is met. If you're using multiple SUMIF criteria, you'll use the SUMIFS function, which is slightly different from the SUMIF formula.

SUMIF Syntax

The basic syntax is =SUMIF (range, criterion, [sum_range])

SUMIF has three arguments;

  1. The range of cells to apply the criteria to.
  2. The criteria applied, including a logical operator if applicable
  3. The sum_range or range that is summed.

With the SUMIF function, Google Sheets scans through a specific range of cells matching your condition. The range is summed once the condition is met to give you a single value.

SUMIF Examples

Google Sheets SUMIF examples include anything where you'd need to find data or values based on a single criterion. For instance, you can find the sum of certain types of invoices, the total sales of a product, and the cost of specific goods before the delivery date. SUMIF can also be used for competitor analysis to find the sum of values like prices, deals, promotions, and so forth.

Unfortunately, SUMIF can only give you a sum, so it can't provide you with information regarding qualitative data like survey results. However, it can give you valuable insight into marketing performance from other tools like Google Search Console, your website, social media, and so forth.

Of course, there are many potential use cases for the SUMIF formula; how you use it will mainly depend on the type of data you gather and organize. Let's take a closer look at some formula examples to help you understand exactly how SUMIF works.

Let's say you want to find the total sales of a product for March in a specific range of cells. For our example, let's say the cell range is D2:D10, and the date criteria exist in cells B2:B10. So, in this example, the formula=SUMIF(D2:10, "March", B2:B10), Google Sheets will sum only the values within C2:C10 when the cells in the range D2:D10 equal "March."

More on SUMIF

SUMIF is a pre-existing function in Google Sheets and other spreadsheet tools. In simpler terms, the range is tested against a single criterion, and the criterion is a specific pattern applied to the range based on the information you need.

If the range contains numbers instead of text, the criterion itself is either a string or number in which all the cells within a range are checked for the specific criterion.

The SUMIF Google Sheets formula can be used to sum blank cells and non-blank cells. You'll use double quotation marks to use SUMIF for completely blank cells.

So why use the SUMIF formula instead of manually calculating the sum of various conditions? Ultimately, the SUMIF formula will automatically update as values within your spreadsheet change. For instance, if you're using this formula to track sales data, the sum based on a condition like the specific month will change based on any new information entered into your spreadsheet.

How to use SUMIF in Google Sheets

Before we move on to more advanced tips, you should learn how to use SUMIF correctly. Here, we'll walk you through the basic steps to use the formula properly. Once you have Google Sheets open, follow these instructions:

1. Select where to put the function

Once you have a spreadsheet in front of you, select the cell where you'd like the function to display its result. Then, find the formula bar at the top of the spreadsheet and begin typing in the formula. You can hit enter when your formula is complete to get the result.

2. Set range

The first part of the formula is where you'll establish the range, ultimately, which cells you want the formula applied to.

3. Set criteria

Next, depending on your needs, you'll set the criteria, which can be a text or number. The condition is the "IF" of SUMIF and tells the formula to only sum cells based on a specific condition. For instance, if the criteria is a specific product name, the function will scan cells for the ones that contain that product name.

4. Set sum range

The criteria range is the range for the condition, the range of cells that are summed. You can omit this argument, in which case the function will add the cells specified in the range. The sum range must be the same size as the range to work properly.

Advanced SUMIF function techniques

Now that you understand that the SUMIF Google Sheets formula can help you find the sum of different cells based on criteria, you might wonder how to use it to your advantage. The SUMIF formula is pretty basic once you get the hang of it, but here are a few more advanced ways you can begin using it:

SUMIF function with multiple conditions (using AND and OR)

The SUMIF function essentially adds the values of cells based on a condition or specific criteria. However, you can use SUMIF with multiple criteria, in which case it becomes a SUMIFS function. The SUMIFS formula is similar, but instead of using one condition, you can use multiple criteria.

For instance, you can use AND and OR in a single SUMIFs formula, something you can't do with a SUMIF formula because it only allows for a single condition. With SUMIFS formulas, you can use more than one condition to get a sum by using AND logic, making them slightly different from SUMIF functions.

An example of the SUMIF formula or SUMIFS function using AND might be if you're looking for data pertaining to oranges, sales dates, and pending orders. For instance, the SUMIF formula can tell you the value associated with oranges in a particular period and the value or sum associated with orders and pending orders, which can help you more easily organize and sort your data.

The SUMIFS and SUMIF functions have the same purpose: to add values of cells in a range that meet specific criteria. However, the SUMIFS function looks like this

=SUMIFS(sum_range, range1, criteria1, [range2], [criteria2], ...)

With the SUMIFS function, the range argument looks a little different. For instance, there are at least two ranges Google Sheets must evaluate. In addition, there are multiple criteria. Criteria1 is used on range1 while criteria2 is used on range2, and so forth.

Nest SUMIF functions for more complex calculations

Nesting is a term used to describe multiple conditions within a single formula in Google Sheets. Ultimately, a nested function is used within the same cell, combining different types of functions. You can create more advanced datasets by nesting IF statements like the SUMIF formula with other functions like the array formula, which performs calculations within an array of values or a combination of rows and columns of values.

Use wildcards with SUMIF (using asterisks and question marks)

Using wildcards with SUMIF, including asterisks and question marks, enables you to sum values using partial criteria. The asterisk is a popular wildcard that can represent missing characters at the beginning or end of a criterion. For instance, an asterisk can organize data that starts with a specific number or letter. For instance, if you want to sum values for all months starting with J, you can use the asterisk wildcard.

In this case, the SUMIF Google Sheets formula would look like this: =SUMIF(D2:D10, C2:C10, "J*")

As we mentioned, the asterisk can also be used at the end of a criterion. However, it's important to note that placement matters. For instance, if you're using the SUMIF formula above, the text in the cell must start with the letter J. Meanwhile, if you're looking for a sum pertaining to months that end in the letter y, the SUMIF formula would look like this:

=SUMIF(D2:D10, C2:C10, "*y")

The question mark wildcard works similarly to the asterisk wild card in the SUMIF function. However, the question mark represents an unknown single character within a text string. For instance, if you're looking for the sum associated with a specific product name that could be misspelled, you may use the question mark wildcard. You can use as many question marks as necessary to sum values from various specified criteria.

Many people use the asterisk more than the question mark because it helps them easily sort various types of data. However, the question mark makes sense where there are variations in how the text is written. For instance, you may have spaces between first and last names that don't always appear when data is entered manually.

Using the SUMIF function may seem fairly straightforward. However, anyone using manual data entry and organization can encounter some issues if they're not careful. Here are a few tips and tricks for using the SUMIF formula in Google Sheets:

Use named ranges to simplify SUMIF formulas

The most efficient way to use the SUMIF function is to name your range based on the information it represents. Naming ranges makes data easier to read and formulas faster to type and understand. In addition, once you've named a range, you won't have to type in the specific row and column headings. Instead, you can use the range's name, making everything much easier.

For instance, let's say you named a range "Sales_Month" to specify the different sales months and another range "Sales_Total." You may be looking for a specific repeat customer's name, John. In this case, the SUMIF function would be "=SUMIF(Sales_Month," John", [Sales_Total]".

This information would tell you the sum of John's sales for a given period, depending on your "Sales_Month" data range. Ultimately, it depends on how you organize your date. For instance, you may name ranges based on months, quarters, years, products, or specific actions and descriptors.

Using named ranges can help you save time and can help multiple team members work on the same spreadsheet, especially those who are using formulas for the first time. In addition, since names are easier to use than values, you can make more efficient and effective formulas for entire teams.

Improve readability with line breaks and indentation

Formatting is crucial with using the Google Sheets SUMIF function. Depending on your data, you may insert line breaks and indentations when you have multiple parts of a single text string that you want on separate lines for readability. For instance, addresses, first and last names, and brand and product can be used with line breaks to help you show each part on a different line.

Leverage autofill and copy-paste for efficiency

Google Sheets uses autofill to help you enter data more efficiently. To autofill in Google Sheets, all you have to do is select the cells you want to be filled, click, and drag the box in the corner of your selection. As you drag across the spreadsheet, you should see the cells highlighted in blue. When you stop clicking, the cells will automatically be filled in for you, like a faster, more efficient copy and paste.

You can use this as a tool to fill in columns or rows with a series of numbers. For instance, if you track the days of the week or months or use consecutive numbers, you'll select all the cells you want to fill and drag the blue box.

You can even skip parts of a series by leaving them blank. For instance, if you're organizing social media statistics, you may choose to leave Saturday and Sunday out if you don't post on those days. Depending on your needs, this process even works for a series of dates or a custom list.

Autofill isn't perfect. You can only use it when filling in columns or rows, so there's no diagonal functionality. It only works with linear data, so you can't fill it in with a series of numbers and skip every other number.

Testing and debugging SUMIF formulas for accuracy

If you want your SUMIF function to work properly, you'll need to test it. Even if you're a spreadsheet pro, you should always test your functions for accuracy because it can affect your entire spreadsheet and any data visualizations you make using the data reflected on it. For instance, if you use the SUMIF function to track sales data over a period of time, you'll need that information to be accurate.

The Google Sheets SUMIF function may not work if you don't use the exact syntax required, so testing it against your data and doing manual math is crucial after you implement it. For instance, if you're using SUMIF to look at the sum of invoices from a specific partner, you should add them manually before blindly trusting the function.

If you have a small spreadsheet, testing and debugging your SUMIF formula will be much easier, so we recommend testing your function on a smaller scale before moving it over to your more official spreadsheet. If you have any issues or the formula isn't working properly, you can brainstorm solutions.

Then, once your formula works, you can implement it on the master spreadsheet.

Combine SUMIF with other functions for powerful analysis

Google Sheets can be a powerful business intelligence tool. Learning the SUMIF and SUMIFS functions can help you sum cells more accurately and efficiently without wasting time on manual processes. Of course, this won't help you eliminate human error, but it can improve data organization processes within your business.

But the SUMIFS formulas aren't the only ones you should be aware of. Combining SUMIF with other functions can make your data analysis even more powerful, giving you access to higher-quality data that drives decision-making.

Unfortunately, manually tracking data in spreadsheets is time-consuming and complicated, regardless of the formulas you use. Google Sheets SUMIFS formulas can't solve all your spreadsheet woes. Instead, track your website and marketing metrics using Mailchimp. Mailchimp's metrics give you key insights into your business' performance to help you make data-driven decisions.

Share This Article