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
- Customer Resources
- 67.9K Get Help
- 474 Global Discussions
- 207 Use Cases
- 517 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 83 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!