CountIF one item is a part of multiple selections
Greetings-
Im trying to do metrics and a graph for individual items that may be selected as part of multiple items in 2023. For example, my form has the option to select one or multiple from the list:
Kids (5-12)
Teens (13-17)
Adults (18-64)
Seniors (65+)
Families
General Public
Staff Use
So a user could select Kids and Teens but I need to count everytime in 2023 someone selected kids either as the only selection or part of a multiple selection. Below is the formula that works if they only select one but I cant figure out how to say countif kids (for example) is one of the multiple items they chose. The formula breaks if they have more then just kids selected in the column. I need to know how many times any of these options were selected in 2023.
=COUNTIFS({Community Engagement Request Range 5}, "Kids (5-12)", {Community Engagement Request Range 2}, "2023") Thank you for any help! MD
Best Answer
-
You would need to use the HAS function like so:
=COUNTIFS({Community Engagement Request Range 5}, HAS(@cell, "Kids (5-12)"), {Community Engagement Request Range 2}, "2023")
Answers
-
You would need to use the HAS function like so:
=COUNTIFS({Community Engagement Request Range 5}, HAS(@cell, "Kids (5-12)"), {Community Engagement Request Range 2}, "2023")
-
Do you have a sheet summary that collects/counts all of these values that you're building the chart from?
First column with each category you need a count for: Kids, Teens, Adults
Second column, corresponding with the category in the first column: =COUNTIF({Community Engagement Sheet: Category column}, CONTAINS("category@row", @cell))
Is that what you had in mind?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!