COUNTIF / HAS / AND - How to count multiple selections in the same column.

TTurner
TTurner ✭✭
edited 03/09/23 in Formulas and Functions

Hello to All,

I am trying to count items in a column. I have the formula in place for all inpatient and another formula for ambulatory. I need a count for those that have selected inpatient AND Ambulatory, basically how many selected both locations. This is what I have tried:

=COUNTIF(Location:Location, HAS(@cell, "inpatient"), HAS(@cell, "ambulatory)) and a few others but all result in #unparseable.


Tags:

Best Answer

  • Nick Korna
    Nick Korna ✭✭✭✭✭✭
    Answer ✓

    Hi @TTurner,

    If you're just wanting the count for cells with both Inpatient and Ambulatory:

    =COUNTIF(Location:Location, AND(HAS(@cell, "Inpatient"), HAS(@cell, "Ambulatory")))

    Hope this helps, if you've any questions etc. then just post! 😊

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!