Sep 13 2022 07:01 AM
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?
Sep 13 2022 07:15 AM - edited Sep 13 2022 07:19 AM
@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.
Sep 13 2022 07:31 AM