Formula help - count of a value from a multi-select dropdown field
I have a column in a sheet that is a multi select drop down containing people's names. I then want to count the number of cells that contain a particular name - whether it's the only name listed or is one of the names in the cell. Can someone help me with what formula to use?
This formula is only counting the cells that have this person's name in it solely (i.e. doesn't have another name selected in the drop down): =COUNTIF({Wave 2 Tester}, "Ricky Jones"). I expected that result.
I just can't figure out how to write the formula to count cells where "Ricky Jones" is listed whether solely or one of multiple names in that cell. I tried this formula: =COUNTIF({Wave 2 Tester}, "*Ricky Jones*") but that didn't work and actually resulted in 0 (so not even getting ones where's he's listed by himself). Any ideas? Thanks!
Best Answer
-
Try this:
=COUNTIFS({Wave 2 Tester}, HAS(@cell, "Ricky Jones"))
Answers
-
Try this:
=COUNTIFS({Wave 2 Tester}, HAS(@cell, "Ricky Jones"))
-
Thanks Paul - that didn't work perfectly (as in I couldn't get it to perform the HAS function and count in the same formula) BUT I used your suggestion to create a new column to do the HAS evaluation and then a separate formula to count where it was true. Thank you!
-
Were you getting an error or an incorrect count? I use the above fairly regularly with no issue.
-
Actually, Paul - I got it to work. I had done something wrong with the reference. Oops! Thanks for the advice!
-
Happy to help. 👍️
-
Worked for me as well.
Cheers.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!