COUNTIF / HAS / AND - How to count multiple selections in the same column.
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.
Best 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
-
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! 😊
-
This worked perfectly! Thank you.
-
You're most welcome; happy to have helped!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!