Use only parent rows in a referenced sheet

I'm trying to count the number of times a text string is found in a different sheet in columns of the same name, but I only want to count if the name is in a parent row of the referenced sheet. The formula below is #unparseable. What is wrong with it?

=COUNTIF({Sheet1 Names}, CONTAINS(Names@row, @cell), {Sheet1 Names}, count(ancestors(@cell))=0)

Thank you, John

Best Answer


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!