![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 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 |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 50
|
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,"")
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
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 |
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Thanks Guys
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2002
Location: Toledo, OH
Posts: 18
|
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 ] |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
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 |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|