Sumif function with multiple criteria in Google Sheets

MarissaB

New Member
Joined
Jun 20, 2020
Messages
20
Office Version
  1. 365
Platform
  1. MacOS
Hi all,

I have a dataset on which I applied a SUM.IF function, in combination with an IF function. In the attachment you find how I did this searching for one criteria.
However, now I would like to search for multiple criteria. I would like to see the amount for the sum of 6 different criteria, without copy+paste the formula 6 times.

So, I know I can do:
ALS(C2="Payroll";SOMMEN.ALS(Blad2!D:D;Blad2!A:A;'Calculation sheet'!A2;Blad2!B:B;"Kosten Werkgever"))+ ALS(C2="Payroll";SOMMEN.ALS(Blad2!D:D;Blad2!A:A;'Calculation sheet'!A2;Blad2!B:B;"Loon voor bijdrage Zvw")) etc. But I would like to have ALS(C2="Payroll";SOMMEN.ALS(Blad2!D:D;Blad2!A:A;'Calculation sheet'!A2;Blad2!B:B;"ALL DIFFERENT OPTIONS TO SEARCH FOR"))

Can I solve this with an array function? And If so, how do I do this?

Thanks a lot!!
Marissa
 

Attachments

  • AFE37968-2004-462A-AEC2-C46601B9BC43.jpeg
    AFE37968-2004-462A-AEC2-C46601B9BC43.jpeg
    92 KB · Views: 5
Last edited by a moderator:

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,556
Office Version
  1. 365
Platform
  1. Windows
How about
ALS(C2="Payroll";SOM(SOMMEN.ALS(Blad2!D:D;Blad2!A:A;'Calculation sheet'!A2;Blad2!B:B;{"Kosten Werkgever", "Loon voor bijdrage Zvw" })))
 

MarissaB

New Member
Joined
Jun 20, 2020
Messages
20
Office Version
  1. 365
Platform
  1. MacOS
Thanks for your reply. However, this is not working as it gives an error unfortunately.
 

MarissaB

New Member
Joined
Jun 20, 2020
Messages
20
Office Version
  1. 365
Platform
  1. MacOS
Or at least - it is working in Excel but not in google sheets. Do you know if there are differences with this formula between those two?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,556
Office Version
  1. 365
Platform
  1. Windows
I know nothing about Sheets so cannot help.
If you are wanting formulae for Sheets, rather than Excel, you should clearly state that in your question & the thread should be posted in the "General Discussion & Other Applications" section of the site.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,459
Office Version
  1. 365
Platform
  1. Windows
it is working in Excel but not in google sheets.
You can't use array constants as sumifs criteria with google sheets, you will have to do it the long way, sumifs(....)+sumifs(....)+sumifs(....)
 

Watch MrExcel Video

Forum statistics

Threads
1,127,610
Messages
5,625,795
Members
416,138
Latest member
Pizzaman22

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
Top