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

slam

Well-known Member
Joined
Sep 16, 2002
Messages
915
Office Version
  1. 365
  2. 2019
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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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.
 
Upvote 0
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 :(
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,223,675
Messages
6,173,749
Members
452,533
Latest member
Alex19k

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top