Counting values in a multi-select column when "Yes" in another column?

tmccray
tmccray ✭✭
edited 12/09/19 in Formulas and Functions

I'm trying to count instances of a specific selection in a multi-select column when "Yes" is in another column.  I've tried various FIND, COUNT, COUNTIF, COUNTIFS then IF or AND, but I'm not able to figure this one out.  

 

This one ALMOST works, but it won't count when another value is selected in the multi-select:

=COUNTIFS({Range}, "Board", {Range}, "Yes")

 

Any ideas?

Thanks!

 

Comments

  • JLC
    JLC ✭✭✭✭✭✭

    If I understand your ask correctly, you'll have to use CONTAINS. Think this should do the trick:

    =COUNTIFS({Range with yes}, "Yes", {Range with multi select}, CONTAINS("Board", @cell))

    Hope that helps/answers what you were actually looking for!

  • tmccray
    tmccray ✭✭

    That did the trick!!  Thank you!!  yes

  • JLC
    JLC ✭✭✭✭✭✭

    You're welcome! One thing I would keep in mind is that you'll need to update this if you have any words that both include the same characters. So for example, I'm in the insurance industry and we do this COUNTIF for certain products. We were getting hung up on incorrect COUNTIFS dealing with the word "Par". What I'd neglected to remember is that the word is also in the multi-select option of "Non-Par". What we ended up doing was this:

    Count of times where "Par" product is tagged = (Count of only "Par") + (Count of contains "Par") - (Count of only "Non-Par"). This effectively counts up both instances where it's ONLY "Par" as well as where the instance is both "Par" and "Non-Par". 

    Hope that helps save you some time!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!