# 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

If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

#### 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,102,729
Messages
5,488,535
Members
407,643
Latest member
samerf86

### This Week's Hot Topics

• Timer in VBA - Stop, Start, Pause and Reset
[CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
• how to updates multiple rows in muliselect listbox
Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
• Delete Row from Table
I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
• Assigning to a variable
I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
• Way to verify information
Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
• Active Cell Address – Inactive Sheet
How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...