Custom Format for Hiding #DIV/0!

Matt

Board Regular
Joined
Feb 16, 2002
Messages
212
It's probably wishful thinking but I'm sure I've used it before - is there a custom format which I can apply to a cell to hide the #DIV/0 error?

thanks Matt
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Not that I know of, but a simple test in the cell would solve it also........ IF numerator is in A, and denominator is in B, formula would be =IF(B1<>0,+A1/B1,"")
 
Upvote 0
On 2002-03-28 08:34, Matt wrote:
It's probably wishful thinking but I'm sure I've used it before - is there a custom format which I can apply to a cell to hide the #DIV/0 error?

thanks Matt

Matt,

It's better to add control to formulas that lead to #DIV/0! as in:

=IF(B1,A1/B1,0)

instead of just:

=A1/B1

If you insist on formatting, use conditional formatting with the formula:

=ISERR(E2)

and select white a color on the Font tab.

Aladin
 
Upvote 0
Here is an example of some formatting that I'm using currently:

=IF(ISBLANK(B32)," ",AVERAGE(B32:E32))

It does away with the #DIV/0 error text. Of course, replace my cell & range references with your own.
This message was edited by Geronimo on 2002-04-01 04:14
 
Upvote 0
On 2002-04-01 04:13, Geronimo wrote:
Here is an example of some formatting that I'm using currently:

=IF(ISBLANK(B32)," ",AVERAGE(B32:E32))

It does away with the #DIV/0 error text. Of course, replace my cell & range references with your own.
This message was edited by Geronimo on 2002-04-01 04:14

Geronimo,

An alternative to your current way of avoiding the #DIV/0! error would be:

=SUM(B32:E32)/MAX(1,COUNT(B32:E32))

I notice that you return a space (i.e., " ") instead of a blank (i.e., "") or a zero.

The alternative above will return a zero. If you'd like not to see a zero, custom format the cell of the formula as:

0.0;-0.0;;@

or

[=0]"";General

Aladin
 
Upvote 0

Forum statistics

Threads
1,213,559
Messages
6,114,302
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top