getting rid of #DIC/0!
On 23 Jun, 16:55, James wrote:
is there something you can add to a formula so if it equals #DIV/0! the cell
will remain empty or blank?
You need an error trap, and there are several ways to do this. I'm
assuming your formula is =A1/B1. You'll need to adjust the following
formulae to refer to the cells that form the actual numerator and
denominator to your formula.
The most robust #DIV/0! error trap, in my opinion, is simply:
=IF(B1=0,0,A1/B1)
which returns a zero rather than #DIV/0! error. You could use:
=IF(B1=0,"",A1/B1)
if you want the cell to remain blank.
There are other ways to do it, such as using =IF(ISERROR(A1/B1),"",A1/
B1) or =IFERROR(A1/B1,"",A1/B1) if in Excel 2007.
|