Contains with Multi-select column

I have a column that is multi-select for our systems. The values in this column are X, Xi, S, SP and a few others. I am trying to count the number of rows where the value "X" is selected. Sometimes it may be only X, other times the column value may have both X and Xi. When i use contains, it is counting everything in the string, so it includes all the instances of Xi as well as X.

I've tried multiple approaches, but am stuck. Any help would be most appreciated. This was the original formula I tried.

=COUNTIF({Platform}, CONTAINS("X", @cell))

Best Answer

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    Answer ✓

    This was tricky. Try this =COUNTIF({Platform}, IF(HAS(@cell, "X"), "true", "false") = "true")

    This is essentially counting each cell and marking it as true if it contains exactly an "X"

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!