# 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.

Tags:

• ✭✭✭✭✭

@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

• ✭✭✭✭✭

@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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!