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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!