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)
thinkspi.com
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 😂)
thinkspi.com

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)
thinkspi.com

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?
thinkspi.com

@Paul Newcome I forgot the comma before FINDit works! Thank you so much for your 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)
thinkspi.com

@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]
thinkspi.com

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


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
Help Article Resources
Categories
Check out the Formula Handbook template!