# GOOGLE SHEETS: SUMIF with multiple range columns and multiple sumrange columns?

#### slam

##### Well-known Member
I have a spreadsheet set out with 10 unique text entries in column A (row 2 through 11), and the same values in column C & E. In B, D, & F, I have a corresponding value that I am trying to sum. The easy solution is to put them all in one column, and use a basic sumif, but the spreadsheet needs to be laid out this way. How can I get it to work over multiple columns for both the range and sumrange? N2, N3, and so on is my criteria I'm matching it to. Here's where I'm at with the formula:

=sumif((A\$2:A\$11,C\$2:C\$11,E\$2:E\$11),N2,(B\$2:B\$11,D\$2:D\$11,F\$2:F\$11))

Anyone know what I'm doing wrong, or is this not possible with sumif?

Last edited:

### Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

#### steve the fish

##### Well-known Member
Re: SUMIF with multiple range columns and multiple sumrange columns?

You could do this:

=SUMPRODUCT(SUMIF(INDIRECT({"A\$2:A\$11","C\$2:C\$11","E\$2:E\$11"}),N2,INDIRECT({"B\$2:B\$11","D\$2:D\$11","F\$2:F\$11"})))

or simply add 3 sumif formulas together.

#### slam

##### Well-known Member
Re: SUMIF with multiple range columns and multiple sumrange columns?

You could do this:

=SUMPRODUCT(SUMIF(INDIRECT({"A\$2:A\$11","C\$2:C\$11","E\$2:E\$11"}),N2,INDIRECT({"B\$2:B\$11","D\$2:D\$11","F\$2:F\$11"})))

or simply add 3 sumif formulas together.
Well, that does indeed work perfectly in Excel, and I assumed it would in googlesheets too, but that's not the case

#### Joe4

Re: SUMIF with multiple range columns and multiple sumrange columns?

Well, that does indeed work perfectly in Excel, and I assumed it would in googlesheets too, but that's not the case
Is this an Excel or a Google Sheets problem? Note that they are NOT the same thing, and do not necessarily work the same.

If you post Google Sheets questions, be sure to mention that in the title and/or post, and it should be posted to the "General Excel Discussion & Other Questions" forum, and not the "Excel Questions" forum.
I can move this thread for you, if this in indeed a Google Sheets question.

#### slam

##### Well-known Member
Re: SUMIF with multiple range columns and multiple sumrange columns?

Is this an Excel or a Google Sheets problem? Note that they are NOT the same thing, and do not necessarily work the same.

If you post Google Sheets questions, be sure to mention that in the title and/or post, and it should be posted to the "General Excel Discussion & Other Questions" forum, and not the "Excel Questions" forum.
I can move this thread for you, if this in indeed a Google Sheets question.
Yes, my apologies for not specifying. I have access to both, which is why I was able to see it worked in Excel, but not googlesheets. I wouldn't have expected something like this would behave differently in each.

That said, I have found an alternative solution in googlesheets, by reworking the layout of data, so I don't need to pursue a solution any further. Thank you for your time.

1,101,904
Messages
5,483,639
Members
407,400
Latest member
Rakeforms

### This Week's Hot Topics

• Finding issue in If elseif else with For each Loop
Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
• MsgBox Error
Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
• CELL FORMAT - IF CONDITION
My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
• Show numbers nearly the same
Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...