# 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)

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

Tags:

• ✭✭✭✭✭✭

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")

• ✭✭✭✭✭✭

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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!