COUNTIFS + CONTAINS with a contact list
Hello! I am trying to use a COUNTIFS formula with a CONTAINS formula for a list of contacts. The formula needs to count if a project is a certain phase, and if the assigned project lead is one of the designated contacts in the list of contacts I have. Can someone please provide an example of what this formula would look like? Everything I have tried had not worked, and I am not sure what the root problem is.
Best Answers
-
Try replacing the opening curly bracket before your name with quotes.
HAS(@cell, {Paige Van De Grift")
changes to
HAS(@cell, "Paige Van De Grift")
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
You would need to either incorporate an OR statement or include a column on the source sheet that has a column formula to output the team based on the lead.
=COUNTIFS({PHase}, "PTI", {Lead}, OR(HAS(@cell, "Tim"), HAS(@cell, "Jon"), HAS(@cell, "Jim")))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
The CONTAINS function does not work well with contact lists. Try using a HAS or FIND function instead.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Paul, thanks for the info!
I am trying to use the HAS function but cannot figure out why it is giving me an error. For context, the first half of the formula works, but the {Project Lead}, HAS(@cell, {Paige Van De Grift") is where I am having problems. The project lead column is a contact column that is open to type in any names within the organization. Once I figure this part out, I will need to add 7 other contacts to the formula.
=COUNTIFS({Portal Project Phase}, [Primary Column]@row, {Project Lead}, HAS(@cell, {Paige Van De Grift"))
Please let me know if you have any suggestions!
-
Try replacing the opening curly bracket before your name with quotes.
HAS(@cell, {Paige Van De Grift")
changes to
HAS(@cell, "Paige Van De Grift")
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thank you for catching that! Now that the formula works, how do you suggest adding the other contact names? The formula currently has two criteria, and I am trying to build on the second criterion (the name) to add more contacts, but I am unsure of how to do so.
The end goal would be to COUNTIFS it met the criteria for the project phase, and the criteria for the project lead name, which would match 1 out of 8 contacts. Not sure if an AND/IF statement would work here, or how to do so?
-
Are you able to provide some screenshots with sample data?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
I created a simple example that hopefully can help to explain what I am trying to achieve. I am focused on the Project Phase and Project Lead columns, where the phase column is a drop-down, and the lead column is a "contact list" where you can type anyone from the organization's name in.
For this example, I would want to count how many PTI projects are happening for the "team" (names in green), and not any PTI projects for anyone who isn't a part of the team" (red). So, theoretically, the PTI formula result would be "1", the POV formula result would be "1", and the Implement formula would also be "1", as there is one project going on for each phase that has a green team member as the project lead. Please let me know if you need any more information, and thank you in advance for your help!
-
You would need to either incorporate an OR statement or include a column on the source sheet that has a column formula to output the team based on the lead.
=COUNTIFS({PHase}, "PTI", {Lead}, OR(HAS(@cell, "Tim"), HAS(@cell, "Jon"), HAS(@cell, "Jim")))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
That worked, thank you so much for your help Paul!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 302 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!