Using COUNTIFS with CONTAINS
Hello,
I have a contact column where some rows have more than one person assigned to a task. I want to count the number of tasks assigned to any given individual. This is the formula that I have created to do this:
=COUNTIF(CONTAINS("Bernie Sanders", [Assigned]:[Assigned]), "True")
The return value that I get is "0," which is not correct.
Is there another formula that I can try?
Best Answer

My apologies. I keep forgetting the the CONTAINS function doesn't like contact type columns (which I assume your Assigned column is). Let's try the FIND function instead. Just keep in mind the FIND is case sensitive.
=COUNTIFS(Assigned:Assigned, FIND("Colonel Sanders", @cell) > 0)
Answers

It's a syntax issue. Try this...
=COUNTIFS(Assigned:Assigned, CONTAINS("Colonel Sanders", @cell))
(changed the name because I personally like fried chicken better than politics 😂)

This is also returning a "0" :(

My apologies. I keep forgetting the the CONTAINS function doesn't like contact type columns (which I assume your Assigned column is). Let's try the FIND function instead. Just keep in mind the FIND is case sensitive.
=COUNTIFS(Assigned:Assigned, FIND("Colonel Sanders", @cell) > 0)

This formula is returning unparseable.

@Jenna Corso Hmm... That's odd... Can you copy/paste the exact formula from your Smartsheet to here along with a quick screenshot of your column names?

@Paul Newcome I forgot the comma before FINDit works! Thank you so much for your help!

Good catch. Happy to help! 👍️

intente hacer lo que dice @Paul Newcome pero no me funciona, como es que lo escribisste @Jennacorso?? :(

@Brii I believe that @Jenna Corso ended up with the same formula I had provided.
=COUNTIFS(Assigned:Assigned, FIND("Colonel Sanders", @cell) > 0)

@Paul Newcome lo escribí tal cual, pero no me arroja nada :(

@Brii You need to put [square brackets] around each of the column names. When your column name has a space, number, and/or special character, it needs square brackets around it to be recognized in a formula.
[Column Name]:[Column Name]

muchas gracias @Paul Newcome si funciono, me faltaban los corchetes :P jeje lo siento soy novata en eso

@Brii No worries and happy to help. 👍️

Hey there,
I'm having some issues with the formula being #No Match. I have the referenced column being matched from a Vlookup from another table. Would that cause an issue?
Thanks!

Formula errors can be like dominoes... if there is even one cell in the column "Operating System" that says "NO MATCH", this will then appear in any formula referencing the entirety of that column.
Try adding an IFERROR statement around the VLOOKUP so that any errors appear as blank cells instead, like so:
=IFERROR(VLOOKUP([Asset Name]@row, {SMH_Computers_11182021 Range 1}, 5, false), "")
Then once your Operating System column is fixed, any formula referencing this column should also be fixed.
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8  10, Seattle, WA  Register now
Help Article Resources
Categories
Check out the Formula Handbook template!