HomeGoogle DocsSpreadsheetMultiple Criteria Sumif Formula in Google Sheets

Multiple Criteria Sumif Formula in Google Sheets

Published on

You can use the ampersand to join columns and criteria to code a multiple criteria Sumif formula. The criteria can be from one column or two or more different columns. Sumif supports multiple column criteria in Google Sheets.

I have used this trick in an earlier post. The link I have included in the later part of this guide. But that post was not specifically handling this topic. So I thought I should write this tutorial separately as it can be useful for newbies.

To code a multiple criteria Sumif formula in Google Sheets, you should use the function ArrayFormula together with Sumif. Another requirement is the use of the& that joins multiple criteria and corresponding columns.

Why don’t you use the Sumifs instead?

The reason Sumifs formula can’t expand. In other words, it returns a single cell output.

Here you are going to find the benefits of using Sumif with multiple conditions in Google Sheets.

But there’s is a shortfall in using multiple criteria in Sumif using the Ampersand. It won’t work with comparison operators in Sumif. I mean a date difference as the condition in Sumif formula is not possible this way.

How to Use Multiple Criteria in Sumif in Google Sheets

Let me begin with the Sumif Syntax in Google Sheets:

the Sumif syntax arguments in detail

I know you are not new to Sumif. Still here is a basic example meant for those who are inexperienced in the use of the Sumif function in Google Sheets.

Sample Data:

sample data for learning sumif basic usage

Formula:

=sumif(A1:A,"Plum",C1:C)

This single criterion Sumif formula sums column C if the value in column A is “Plum”.

There is no issue in using multiple criteria in Google Sheets Sumif in a single column. As an example, see how I am using the Sumif formula to sum the value of both “Plum” and “Apple”.

=ArrayFormula(sum(sumif(A1:A,{"Plum","Apple"},C1:C)))

This multiple condition Sumif formula has already found a place on my earlier detailed tutorial – How to Sumif When Multiple Criteria in the Same Column in Google Sheets.

When the criteria in Sumif are in two different columns, either you should use the Sumifs function or Sumif combination formula.

Here is that ArrayFormula + Sumif + Ampersand combination.

Multiple Criteria Sumif Formula in Google Sheets

See how I am coding a multiple criteria Sumif formula in Google Sheets.

multiple criteria Sumif formula example 1

The two criteria that I have used in this example formula are from the column A (“Apple”) and B (“United States”). So the column A1: A and B1: B is combined in the Sumif ‘range’.

In other words, to use multiple criteria from two or more different columns in Sumif you should follow the below two tips.

1. Combine the criterion using the ampersand (E2&F2).

2. Combine the corresponding columns to the criteria similarly (A1:A&B1:B).

Multiple Criteria Sumif Formula – Morethan One Criteria in Same Column + Additional Column

You can read OR condition (criteria in the same column) + AND condition (criterion in a different column)

This is also possible using Sumif in Google Sheets! Further, it has an edge over Sumifs. So it’s necessary for me to first show you the Sumifs formula.

Sum column C;

1. If column A contains either of the item “Apple” or “Plum”.

2. The column B contains “United States”.

sumifs formula with 3 conditions in Google Sheets

Formula:

=ArrayFormula(sumifs(C2:C,B2:B,"United States",regexmatch(A2:A,"Apple|Plum"),TRUE))

This formula depends on the mighty Regexmatch in Google Sheets. If you do not use Regex, you may then nest the Sumifs which is not an ideal solution.

Want a formula explanation?

Must Read: Regexmatch in Sumifs in Google Sheets.

Now see the multiple criteria Sumif formula (OR, AND in Sumif) that is equivalent to the above Sumifs.

=ArrayFormula(SUM(sumif(A1:A&B1:B,{"AppleUnited States","PlumUnited States"},C1:C)))

The above multiple criteria Sumif formula would be slightly different in use if the conditions are in cells not within the formula.

In such cases, you should know how to format the conditions. See how I have presented the conditions in the range E2: F3 and used in the formula.

OR, AND logic in Sumif in Google Sheets

There is a clear benefit of using Sumif over Sumifs in multiple conditions in the same or different columns.

The Benefit of Using Multiple Criteria Sumif Formula in Google Sheets

To understand the benefit of Sumif as above in multiple conditions, just remove the Sum in the formula.

You can see that it produces an array result. Unlike Sumifs, Sumif can produce an array result.

the benefit of using multiple Criteria Sumif formula

Similar: Sumifs Array Formula Expanding Issue and Alternative Formulas.

With this example, I am concluding this tutorial on the multiple criteria Sumif formula usage in Google Sheets. Thanks for the stay.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Counting XLOOKUP Results with COUNTIFS in Excel and Google Sheets

We can use COUNTIF or COUNTIFS alongside an XLOOKUP formula to conditionally count the...

Appointment Schedule Template in Google Sheets

An appointment schedule template in Google Sheets can assist you in efficiently managing your...

Creating Sequential Dates in Equally Merged Cells in Google Sheets

Do you know how to create sequential dates in equally merged cells across a...

Running Total By Month in Excel

This tutorial demonstrates how to calculate the running total by month in a range...

More like this

Appointment Schedule Template in Google Sheets

An appointment schedule template in Google Sheets can assist you in efficiently managing your...

Creating Sequential Dates in Equally Merged Cells in Google Sheets

Do you know how to create sequential dates in equally merged cells across a...

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

4 COMMENTS

  1. Hello,

    I have two sheets I’m working with and having an issue with the Sheet1!B2 formula.

    =ArrayFormula(SUMIFS(Sheet2!$B:$B,Sheet2!$C:$C,
    {"Indemnity - Property Damages"},Sheet2!$A:$A,A2))

    This formula works by pulling data from Sheet 2.

    I’m trying to combine the “Expense – Legal Coverage” and “Expense Legal Defense” into the criteria in the same formula in H2.

    I have tried multiple ways and continually get errors.

  2. Hi, I’ve been trying to find a formula that works for what I need it to for a few days now, and I haven’t been successful.

    All I’m trying to do is take the sum of 2 cells in the same column and make it highlight a certain color if their combined values equal 5, for example.

    Is there such a formula for this?

    • Hi, Sam,
      You may try this rule, please.
      Cells: A4 and A6.
      Apply to range (In conditional formatting): A4,A6
      Format rule > Custom Formula (In conditional formatting):=$A$4+$A$6=5

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.