Count Children Criteria Out of Totals

Smartsheet Community:

I am Trying Create a Formula That Will Count The Total Number of Children That Pass Out of the Entire Population Set. For Example:

10 Out of 300 Test Cases Passed

My Formula:

=COUNTIF(CHILDREN()), "Pass" + " Passed Out Of " + (COUNT(CHILDREN(), " ") + " Pass")


Best Answer

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓

    I believe @Michael Culley is suggesting

    =VALUE(COUNTIF(CHILDREN([Test Status]@row), "Pass")) + " Passed Out Of " + VALUE(COUNTIFS(CHILDREN([Test Status]@row), OR(@cell = "", @cell <> "")))

    The formula uses the VALUE function because you are mixing text and numbers together. Smartsheet doesn't know whether to treat the COUNTIFS function as text or number. Without the VALUE function the formula would throw an error (try it). The VALUE forces the function to behave as a number.



Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!