When COUNTIF returns a "0" qty. show cell as blank
I am using this formula to count how many cells in a row have their checkbox checked, and it is working correctly. When the total = 0, I would like for the cell to appear blank instead of showing 0. I have tried nesting with an IF but I can't seem to get it to work.
=COUNTIF(Manufacturer@row:[Asset Tag #]@row, 0)
Any help would be appreciated.
Best Answer
-
@Jamy Crum this should do the trick..
=If(COUNTIF(Manufacturer@row:[Asset Tag #]@row, 0)=0,"",COUNTIF(Manufacturer@row:[Asset Tag #]@row, 0))
Basically
If the Count if = 0 then put "" in the column, else use the countif
Another simple trick to do if you are ever trying to do the math on the column and the mix of text and numbers causes issues
Example: 6+""+7+8+"" = #UNPARSEABLE
is to create a conditional format where you set the font to white on white if the value is zero. That way the math is still done but the user doesn't see the value. Could be a bit quicker to execute in the long run but we are probably talking milliseconds
Brent C. Wilson, P.Eng, PMP, Prince2
Facilityy Professional Services Inc.
http://www.facilityy.com
Answers
-
@Jamy Crum this should do the trick..
=If(COUNTIF(Manufacturer@row:[Asset Tag #]@row, 0)=0,"",COUNTIF(Manufacturer@row:[Asset Tag #]@row, 0))
Basically
If the Count if = 0 then put "" in the column, else use the countif
Another simple trick to do if you are ever trying to do the math on the column and the mix of text and numbers causes issues
Example: 6+""+7+8+"" = #UNPARSEABLE
is to create a conditional format where you set the font to white on white if the value is zero. That way the math is still done but the user doesn't see the value. Could be a bit quicker to execute in the long run but we are probably talking milliseconds
Brent C. Wilson, P.Eng, PMP, Prince2
Facilityy Professional Services Inc.
http://www.facilityy.com
-
Excellent! That seemed to do the trick.
I wasn't thinking that I could do another COUNTIF nested with the IF. Thanks for the additional tips when mixing text and numbers. I'm sure I'm going to run into that down the road.
Thank you so much for your help.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!