Using Countifs with Cells Containing Multiple Values

I am trying to setup a formula that counts how many times a certain option is selected from a dropdown list. In this dropdown you are able to make multiple selections. And this is where I am having Issues.

I was able to use:

=COUNTIFS({Drop Down List}, Option@row, {Week}, Week$2)

to count how many times the option is selected in the column, but only if it was the only selection. Is there a way for me to get this formula to look for option 1 in a cell with multiple options selected?


Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    You would need the CONTAINS function if you are using a text/number column as in your screenshot or the HAS function if you are using a multi-select dropdown type column (note syntax differences between the functions).

    =COUNTIFS({Drop Down List}, CONTAINS(Option@row, @cell), {Week}, Week$2)

    =COUNTIFS({Drop Down List}, HAS(@cell, Option@row), {Week}, Week$2)

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!