Formula

New Contributor

I would like to create a formula where it returns the result of a division operation but if it's 0 then just display a blank cell.  Is that possible?

4 Replies
Something like =IF(DivisionFormula=0,"",DivisionFormula)

@MartyLoper  wrote:  ``but if it's 0 then just display a blank cell``

 

Use the Custom format General;-General;""

 

Change General to whatever other numeric format that you want, for example 0.00% for Percentage.

 

Note that the value of the cell is still zero, despite appearances.

 

If want to avoid #DIV/0 errors and display a blank cell, use one of the following paradigms:

 

=IFERROR(A1/B1, "")

or

=IF(B1=0, "", A1/B1)

 

Note that the value of the cell is the null string ("") if an error would have resulted, unlike the above.

Thanks! That did it.
Thanks for the detailed explanation! I was able to get done exactly what I wanted!