CountM with multiple conditions
Hello,
I am working on a formula that takes information from another Smartsheet. The column I am taking information from happens to be a multiple drop-down box. I want to be able to take certain text from the drop down box with other criteria. Essentially I would like a Countifs that can account for a multiple drop box column type.
Answers
-
Are you able to provide some screenshots for reference or some sample data? Are you looking to COUNTM (the number of entries in a multi-select cell) or to COUNTIFS (count how many cells contain a specific text string)?
-
Hi @Paul Newcome, thank you for your response. I can not provide a Screenshot, but what I am looking for is the COUNTIFS option.
If there were a multiple drop down box column with "Pears", "Apples", and "Grapes"
And the cells in the column go as follows:
_____________
Apples, Pears
____________
Pears, Grapes
_____________
Grapes, Apples
______________
Apples
______________
If I wanted to know the number of Apples accounted for in the column (3 in this case), how will I go about that?
-
You would use something like this:
=COUNTIFS({Column To Count}, HAS(@cell, "Apples"))
-
Hi @Paul Newcome. Just trying to clarify, is the "@cell" referring to the same as the {Column To Count}?
-
You would write it exactly as is. @cell tells the HAS function to evaluate the previously established range on a cell by cell basis.
-
@Paul Newcome In this example, if you wanted to count multiple criteria such as "Apples", "Pears", and "Grapes", can you do that as well? I only see the option for one criteria in the formula.
-
@Chris C. You would incorporate an OR function like so:
=COUNTIFS({Column To Count}, OR(HAS(@cell, "Apples"), HAS(@cell, "Pears"), HAS(@cell, "Grapes")))
-
@Paul Newcome Awesome! Worked like a charm. Much appreciated my friend.
-
@Chris C. Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!