Can HAS formula be combined with AND?
I have multi select column - so I was able to do HAS to count all criteria in the column, but I also would like to count if there is a combination of two items in column as well -
So let's say, I have a column called Course Type - i have four possible types - Self-Paced, Class, Video, On-Demand. So some courses have two choices - Self-Paced and Class. So I would like to count those combinations -
What I did was
=COUNTIF({Course Type}, HAS(AND(@cell, "Self-Paced"),(@cell,"Class"))
it does not work since it came out as #UNPARSEABLE
Best Answer
-
Try this instead:
=COUNTIFS({Course Type}, AND(HAS(@cell, "Self-Paced"), HAS(@cell, "Class"), NOT(HAS(@cell, "Video")), NOT(HAS(@cell, "On-Demand"))))
Answers
-
I got it working but not quite -
=COUNTIF({Course Type}, HAS(@cell, "Self-Paced", "Class")), it included those cells that has those two criteria. I have a few classes that have all four options (Self-Class, Video, On-Demand) and I want to exclude those from the calculation.
-
Try this instead:
=COUNTIFS({Course Type}, AND(HAS(@cell, "Self-Paced"), HAS(@cell, "Class"), NOT(HAS(@cell, "Video")), NOT(HAS(@cell, "On-Demand"))))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!