Counting items within a cell
Hi team,
I am wanting to keep track of why people are exiting the company on a monthly basis.
I have the following formula which works perfectly if the exiting employee only selects ONE reason why they are leaving -
=COUNTIFS({HR-559 Exit Interview Range 1}, OR(@cell = "Better job"), {HR-559 Exit Interview Range 2}, AND(IFERROR(MONTH(@cell), 0) = Month@row, IFERROR(YEAR(@cell), 0) = Year@row))
But if within that cell they selected "Better job" and "Relocation" it would return 0 instead of 1 for the Better Job category.
How do I get the formula to count "Better job" when there are multiple options selected within the cell?
Best Answer
-
Hello @Josephine
The HAS or CONTAINS functions are functions to use when dealing with multiselect cells (cells that contain multiple values in same cell)
=COUNTIFS({HR-559 Exit Interview Range 1}, CONTAINS("Better job",@cell), {HR-559 Exit Interview Range 2}, AND(IFERROR(MONTH(@cell), 0) = Month@row, IFERROR(YEAR(@cell), 0) = Year@row))
Will this work for you?
Kelly
Answers
-
Hello @Josephine
The HAS or CONTAINS functions are functions to use when dealing with multiselect cells (cells that contain multiple values in same cell)
=COUNTIFS({HR-559 Exit Interview Range 1}, CONTAINS("Better job",@cell), {HR-559 Exit Interview Range 2}, AND(IFERROR(MONTH(@cell), 0) = Month@row, IFERROR(YEAR(@cell), 0) = Year@row))
Will this work for you?
Kelly
-
Thank you! That has worked perfectly!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!