COUNTIF and CONTAINS and OR
I have 2 columns that have multiple select drop down options. I want to create a formula that allows me to identify a PLO and then count the number of times "BE" OR "BC" OR "BL" or "BM" appear throughout the entire sheet.
so:
=COUNTIF([PLO Alignment]:[PLO Alignment], CONTAINS("A.1 Environment",@cell), Sections:Sections, CONTAINS("BE",@cell))
will identify the PLO A.1 Environment, and find the "BE" and count it... but how do I add the other options?
Thanks!
Kelly
Best Answer
-
Your OR should be part of your last criteria:
=COUNTIF([PLO Alignment]:[PLO Alignment], CONTAINS("A.1 Environment",@cell), Sections:Sections, OR(CONTAINS("BE",@cell), CONTAINS("BC",@cell), CONTAINS("BL",@cell), CONTAINS("BM",@cell)))
Note: If BC / BE / BL / BM are the only options with a "B", you could also use:
=COUNTIF([PLO Alignment]:[PLO Alignment], CONTAINS("A.1 Environment",@cell), Sections:Sections, FIND("B", @cell)>0)
Hope it helped!
Answers
-
Your OR should be part of your last criteria:
=COUNTIF([PLO Alignment]:[PLO Alignment], CONTAINS("A.1 Environment",@cell), Sections:Sections, OR(CONTAINS("BE",@cell), CONTAINS("BC",@cell), CONTAINS("BL",@cell), CONTAINS("BM",@cell)))
Note: If BC / BE / BL / BM are the only options with a "B", you could also use:
=COUNTIF([PLO Alignment]:[PLO Alignment], CONTAINS("A.1 Environment",@cell), Sections:Sections, FIND("B", @cell)>0)
Hope it helped!
-
YAY! It is COUNTIFS, both work and the second one is much easier to work with. Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 58 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!