Countif and contains formula
Hi Help Community,
I'm trying to create a formula that counts if criteria are met in two columns: point of contact and fiscal year. The Point of Contact column is a multi-select so I think I need to use "CONTAINS" in my COUNTIF formula but I'm not sure how to do so. The Fiscal Year is a single select. Here is what I am entering which is giving UNPARSEABLE. Has anyone else done something similar?
THANK YOU!
Best Answer
-
Hi @Tamara Cook
Your closing parenthesis of your CONTAINS formula is surrounded by two commas. Remove the one between "Allison" and ) should take away the #UNPARSEABLE.
When dealing with multi select dropdown list, HAS is the way to go. But it may also works with FIND too.
=COUNTIFS([POC]:[POC], CONTAINS("Allison", @cell), [Fiscal Year][Fiscal Year], "FY21")
=COUNTIFS([POC]:[POC], HAS(@cell, "Allison"), [Fiscal Year][Fiscal Year], "FY21")
=COUNTIFS([POC]:[POC], FIND("Allison", @cell)>0, [Fiscal Year][Fiscal Year], "FY21")
Pick the one that suits your the most!
Hope it helped!
Answers
-
Hi @Tamara Cook
Your closing parenthesis of your CONTAINS formula is surrounded by two commas. Remove the one between "Allison" and ) should take away the #UNPARSEABLE.
When dealing with multi select dropdown list, HAS is the way to go. But it may also works with FIND too.
=COUNTIFS([POC]:[POC], CONTAINS("Allison", @cell), [Fiscal Year][Fiscal Year], "FY21")
=COUNTIFS([POC]:[POC], HAS(@cell, "Allison"), [Fiscal Year][Fiscal Year], "FY21")
=COUNTIFS([POC]:[POC], FIND("Allison", @cell)>0, [Fiscal Year][Fiscal Year], "FY21")
Pick the one that suits your the most!
Hope it helped!
-
Hi @David Joyeuse,
Thank you so much!! This worked once I put the colons between [Fiscal Year]:[Fiscal Year]. Appreciate your help!
Tamara
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!