How to not show "O" results

Options

So I used the formula below to count the courses in my helper field Course Count. I don't want to see the "zeros" in fields that are empty. So, how do I fix that?

=COUNTIF(Courses@row, HAS(@cell, "Wound")) + COUNTIF(Courses@row, HAS(@cell, "ostomy")) + COUNTIF(Courses@row, HAS(@cell, "continence"))



Best Answers

  • Mike TV
    Mike TV ✭✭✭✭✭✭
    Answer ✓
    Options

    @jgneely72151

    Try this:

    =IF(COUNTIF(Courses@row, HAS(@cell, "Wound")) + COUNTIF(Courses@row, HAS(@cell, "ostomy")) + COUNTIF(Courses@row, HAS(@cell, "continence"))=0, "", COUNTIF(Courses@row, HAS(@cell, "Wound")) + COUNTIF(Courses@row, HAS(@cell, "ostomy")) + COUNTIF(Courses@row, HAS(@cell, "continence"))

  • Mike TV
    Mike TV ✭✭✭✭✭✭
    Answer ✓
    Options

    @jgneely72151

    If your course count could ever actually be zero then it's going to just leave the cell blank that should show 0. So here's another way to do it:

    =IF(ISBLANK(Courses@row), "", COUNTIF(Courses@row, HAS(@cell, "Wound")) + COUNTIF(Courses@row, HAS(@cell, "ostomy")) + COUNTIF(Courses@row, HAS(@cell, "continence"))

Answers

  • Mike TV
    Mike TV ✭✭✭✭✭✭
    Answer ✓
    Options

    @jgneely72151

    Try this:

    =IF(COUNTIF(Courses@row, HAS(@cell, "Wound")) + COUNTIF(Courses@row, HAS(@cell, "ostomy")) + COUNTIF(Courses@row, HAS(@cell, "continence"))=0, "", COUNTIF(Courses@row, HAS(@cell, "Wound")) + COUNTIF(Courses@row, HAS(@cell, "ostomy")) + COUNTIF(Courses@row, HAS(@cell, "continence"))

  • Mike TV
    Mike TV ✭✭✭✭✭✭
    Answer ✓
    Options

    @jgneely72151

    If your course count could ever actually be zero then it's going to just leave the cell blank that should show 0. So here's another way to do it:

    =IF(ISBLANK(Courses@row), "", COUNTIF(Courses@row, HAS(@cell, "Wound")) + COUNTIF(Courses@row, HAS(@cell, "ostomy")) + COUNTIF(Courses@row, HAS(@cell, "continence"))

  • jgneely72151
    jgneely72151 ✭✭✭✭✭
    Options

    Thank you so much for showing me both options and of course, I will go with the ISBLANK formula. I really appreciate your assistance with this. Have a great day! 😉

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!