COUNTIF in Sheet Summary to count values in one column based on a condition on a different column


Hi All,

I need to count the number of all test cases (all rows where column Test Case Ref has a value) where the the value for one particular column "Happy/Unhappy Path" is H.

I am using the formula below, but getting the INCORRECT ARGUMENT SET error. Can someone please help as to what is wrong with the formula below?

=COUNTIF([Test Case Ref]:[Test Case Ref], [Happy/Unhappy Path]:[Happy/Unhappy Path], ="H")

Thank you!


  • Matt Johnson
    Matt Johnson ✭✭✭✭✭✭

    Hi @svijay22

    This formula would work for that:

    =COUNTIFS([Happy/Unhappy Path]:[Happy/Unhappy Path], "H", [Test Case Ref]:[Test Case Ref], <>"")

    This says IF the Path column is "H" and the Ref column is not blank, then count it.

    I hope that helps.


    Matt Johnson

    Sevan Technology

    Smartsheet Aligned Partner

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!