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
Check out the Formula Handbook template!