Help with SUMIFS and COUNTAINS/MATCH/FIND
I need help with a formula to Sum every instance a name appears in a multi-select row of a column.
So from the screenshot, I want to Sum the No. of Hours claimed for each type of overtime reason.
Using SUMIFS I have tried using :
=SUMIFS({Overtime Tracker Range 1}, {Overtime Tracker Range 2}, CONTAINS(@row, @range))
However it comes up with 0. I have also tried using FIND and MATCH instead of contains but those come up for Errors
I have then used this formula:
=SUMIFS({Overtime Tracker Range 1}, {Overtime Tracker Range 2}, "Sickness Cover")
Here I have to manually type the name of the OT Reason. However this only registers if there is a single name in a cell and doesn't work if there are more than one in cell.
So I have two problems:
- My SUMIFS formula doesn't work if I use CONTAINS/FIND/MATCH
- It kind of works if I manually type the name in quotation marks, however only works for the cells with one value and not more than one.
Any help would be greatly appreciated!
Answers
-
Hi @JPFORDTE
When you're looking for a value in a multi-select column, you can use HAS (instead of CONTAINS) to see if the cell has this specific value.
Ex:
=SUMIFS({Overtime Tracker Range 1}, {Overtime Tracker Range 2}, HAS(@cell, "Sickness Cover"))
Then in order to dynamically change what you're searching for in that cell, you can reference the cell to the left of your formula instead of typing the value in quotes. I don't know the name of your column to the left, so I'll call it "OT Reason" in my example:
=SUMIFS({Overtime Tracker Range 1}, {Overtime Tracker Range 2}, HAS(@cell, [OT Reason]@row))
Let me know if this works for you!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Hi Genevieve,
Thank you for helping me. I've tried using =HAS
=SUMIFS({Overtime Tracker Range 1}, {Overtime Tracker Range 2}, HAS({Overtime Tracker Range 2}, [Column2]@row))
However the cells all come up with 0.
-
Hi @JPFORDTE
Inside the HAS function you'll want to have @cell be the range instead of {Overtime Tracker Range 2}
This is because you're looking for the value inside each individual cell of the previously stated range.
Try this:
=SUMIFS({Overtime Tracker Range 1}, {Overtime Tracker Range 2}, HAS(@cell, [Column2]@row))
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!