How to not show "O" results
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
-
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"))
-
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
-
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"))
-
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"))
-
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
Categories
Check out the Formula Handbook template!