How do you write an if statement that replaces #DIV/0! with 0

C

caliskier

Hello,

My title asks my question, but we have a link that pulls in an answer
from another sheet that is #div/0! on the other sheet, but I can't
change the data on the sheet that has the #div/0! error. So I am
trying to write an if statment that gives 0 as a result instead of the
#div/0! error. Any ideas?
 
B

Bob Phillips

=IF(ISERROR(Sheet2!A1),"",Sheet2!A1)

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
R

Ron Rosenfeld

Hello,

My title asks my question, but we have a link that pulls in an answer
from another sheet that is #div/0! on the other sheet, but I can't
change the data on the sheet that has the #div/0! error. So I am
trying to write an if statment that gives 0 as a result instead of the
#div/0! error. Any ideas?

=IF(ERROR.TYPE(cell_ref)=2,0,A12)

The other responses will result in a 0 for any error. However, this formula
should be specific for a #DIV/0 error.


--ron
 
R

Ron Rosenfeld

=IF(ERROR.TYPE(cell_ref)=2,0,A12)

The other responses will result in a 0 for any error. However, this formula
should be specific for a #DIV/0 error.


--ron

That should be:

=IF(ERROR.TYPE(cell_ref)=2,0,cell_ref)


--ron
 
Top