HomeGoogle DocsSpreadsheetSumif Multiple Columns Criteria - It Works in Google Sheets

Sumif Multiple Columns Criteria – It Works in Google Sheets

Published on

Google Sheets SUMIF can handle conditions in multiple columns! Cool, right? See that awesome Sumif multiple columns criteria usage tips.

Sumifs is there! Then why should one go for using Sumif to sum a column but conditions in multiple columns?

I must tell you the benefit. Otherwise, you will end up just learning a cool tip that won’t come in use in real-life.

In my point of view, the one and only benefit or the advantage of SUMIF over SUMIFS is its ability to expand results. The Sumif multiple columns criteria use is relevant at this point.

Google Sheets Sumif with Multiple Columns Criteria

The Sumif function with criterion in multiple columns is possible because SUMIF function in Google Sheets allows the use of Ampersand in range and sum_range. I have mentioned this in my Excel vs. Sheets comparison earlier – How Sumif Function Differed in Excel and Google Sheets.

Sumif with Conditions in Two Columns in Google Sheets

Example:

Sumif Conditions in Two columns

How to sum “Available Qty.” of the Product “Melon” and the Seller is “Seller 2”?

In this, the Sumif conditions are in two columns, i.e. in the range A2:A6 and B2:B6. But Sumif won’t allow in Sheets to use two ranges as arguments.

As mentioned above, the Sumif multiple columns criteria usage is possible with the help of Ampersand. So combine two ranges using the Ampersand and similarly the criterion. Here is that formula.

Generic Formula:

ArrayFormula(sumif(range 1 & range 2,criterion1 & criterion 2,sum_range))

The Sumif Formula with Criteria in Multiple Columns:

=ArrayFormula(sumif(A2:A6&B2:B6,"Melon"&"Seller 2",C2:C6))

Note: When you use the Ampersand sign to join conditions, don’t forget to use the ArrayFormula as above.

Here comes one important question. In the above example both the conditions are text. What about other conditions like;

Number criteria in one column and text criteria in another column.

In this scenario, join the criteria as per this example. Don’t use the double quotes around the number criteria.

"Melon"&40

Number criteria in both the columns:

Follow this example formula. That means avoid double quotes around both the criteria.

50&40

Note: Both the above criteria usage examples are not based on our original sample data.

So you will now agree that Sumif multiple columns criteria formula works in Google Sheets. Now let me draw your attention to the benefit of this usage.

The Advantage of Using Sumif with Multiple Columns Criteria

When you use multiple criteria columns in SUMIF in Google Sheets, there is one clear advantage. It’s none other than the expanding result.

Sumif workaround can not only take conditions from multiple columns, but also from multiple rows. One single SUMIF formula can do all these.

SUMIF Conditions in Rows and Columns in Google Sheets

Expanding SUMIF Formula in G2:

=ArrayFormula(sumif(A2:A6&B2:B6,E2:E3&F2:F3,C2:C6))
Sumif Multiple Columns Criteria in Google Sheets

Conclusion

Hope you have enjoyed this SUMIF tips and tricks in Google Sheets.

In the above examples, I have only used conditions in two columns. But you are allowed to add more columns.

There is one drawback of using the Ampersand to join conditions in two columns. It won’t work in cases like one column contains the start date and the other contains the end date. Here combining the dates won’t make any sense, right?

Definitely, I’ll come up with a solution to this dilemma and update you here.

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...

5 COMMENTS

  1. Hi,

    Thank you very much for all the info.

    I have stuck for a while in the following formula.

    =ARRAYFORMULA(SUMIF(MONTH(Deals!$J$2:$J)&year(Deals!$J$2:$J)&
    Deals!$L2:$L;>=B$1&$A52&"Won Deals";Deals!$T2:$T))

    I have tried many different syntax rules like ">="&B$1, but I can’t get it to work.

    Is that possible?

    • Hi, Alex,

      I assume B1 contains the month number and A52 the year. If so, try this formula.

      =ARRAYFORMULA(SUMIF(MONTH(Deals!$J$2:$J)&"-"&year(Deals!$J$2:$J)&"-"&Deals!$L2:$L;">="&B$1&"-"&$A52&"-Won Deals";Deals!$T2:$T))

  2. Hi,

    Thanks for your articles. I’ve really benefited a lot. I’m just a little stumped on this one, where in the first tab, cell C2.

    What I’m trying to do is to sum up those amounts (tab 2, column E) within the same month (tabs 1&2, column A) if it is a “Yes” in Tab 2, Column G. Here’s what I used:

    =ArrayFormula(if($A$2:$A0,(sumif(LH!$A$2:$A&LH!$G$2:$G, $A$2:$A&"Yes", LH!$E$2:$E)),""))

    But it kept returning a zero. Please help. Here’s the sheet:

    – Link removed by admin –

    • Hi, Loo,

      The issue is with the difference in formatting. On the first tab “Claims Dashboard”, the range A2:A contains dates. But in the tab “LH” the range A2:A contains text strings (date formatted as text).

      In order to work the above formula, please format the range A2:A in the “Claims Dashboard” to text. To do that select A2:A and go to Format > Number > Plain text.

      Best,

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.