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
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!