ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Overwriting #DIV/0 value using ISERROR (https://www.excelbanter.com/excel-discussion-misc-queries/143292-overwriting-div-0-value-using-iserror.html)

ConfusedNHouston

Overwriting #DIV/0 value using ISERROR
 
I have formulas in cells that return a #DIV/0 because there is no data to put
in dependent cells in the formula. Someone show me, apparently way too long
ago, how to use ISERROR to cause the value to be "0" if an error was found
and to be the output of the formula if no errors were found.

It was something like =ISERROR(J5,0,E5/F5) but that's not working. I would
appreciate some help with the syntax.

Thanks


Mike H

Overwriting #DIV/0 value using ISERROR
 
Does this help?

=IF(ISERROR(B3/C3),"",B3/C3)

Mike

"ConfusedNHouston" wrote:

I have formulas in cells that return a #DIV/0 because there is no data to put
in dependent cells in the formula. Someone show me, apparently way too long
ago, how to use ISERROR to cause the value to be "0" if an error was found
and to be the output of the formula if no errors were found.

It was something like =ISERROR(J5,0,E5/F5) but that's not working. I would
appreciate some help with the syntax.

Thanks


Trevor Shuttleworth

Overwriting #DIV/0 value using ISERROR
 
Probably:

=IF(ISERROR(E5/F5),0,E5/F5)

But you could just use:

=IF(F5=0,0,E5/F5)

Regards

Trevor


"ConfusedNHouston" wrote in
message ...
I have formulas in cells that return a #DIV/0 because there is no data to
put
in dependent cells in the formula. Someone show me, apparently way too
long
ago, how to use ISERROR to cause the value to be "0" if an error was found
and to be the output of the formula if no errors were found.

It was something like =ISERROR(J5,0,E5/F5) but that's not working. I
would
appreciate some help with the syntax.

Thanks




Dave Peterson

Overwriting #DIV/0 value using ISERROR
 
It might have been:
=if(iserror(e5/f5),0,e5/f5)

or

if e5 and f5 are always numbers (that may be 0):
=if(f5=0,0,e5/f5)



ConfusedNHouston wrote:

I have formulas in cells that return a #DIV/0 because there is no data to put
in dependent cells in the formula. Someone show me, apparently way too long
ago, how to use ISERROR to cause the value to be "0" if an error was found
and to be the output of the formula if no errors were found.

It was something like =ISERROR(J5,0,E5/F5) but that's not working. I would
appreciate some help with the syntax.

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com