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
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67K Get Help
- 442 Global Discussions
- 154 Industry Talk
- 502 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 79 Community Job Board
- 512 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!