Count Topics by Request Across Sheets – COUNTIF Formula Returning 0

This discussion was created from comments split from: COUNTIF with multiple select dropdown column.

Answers

  • Claudia Sinitsch
    edited 10/07/24

    Hi, I have a similar issue. I tried to replicate this, but referencing another sheet. I have a tracker sheet and want to count topics by request, and one request could cover multiple topics. I now want to have a count by topic. I tried this formular:

    =COUNTIF({Customer Inquiries & Requirements - Impact Range 1}, HAS({Customer Inquiries & Requirements - Impact Range 1}, [Primary Column]@row)),

    but it always gives me "0"

    What did I do wrong? Thanks a lot!

  • KPH
    KPH ✭✭✭✭✭✭

    It could be the way your have referenced the range to look in. Swap out the second range reference to @cell

    =COUNTIF({Customer Inquiries & Requirements - Impact Range 1}, HAS(@cell, [Primary Column]@row))

    Or, if the topics are not multi-select, you should use CONTAINS rather then HAS (also using @cell)

    =COUNTIF({Customer Inquiries & Requirements - Impact Range 1}, CONTAINS([Primary Column]@row, @cell))

    CONTAINS will look in a string for a match. HAS will only look for a complete match.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!