Div/0

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create an if statement that says if the result of another cell is
#DIV/0! then return the result 'price not available' otherwise then return
the result of that cell
 
Assuming that cell is A2,
then in B2:
=IF(ISERROR(A2),"not available",A2)
 
That will give "not available" for all types of error, not just Div/0, Max.

If you want to trap for Div/0 specifically, try
=IF(AND(ISERROR(A2),ERROR.TYPE(A2)=2),"not available",A2)
 
Don't you just need to test for the error type, not whether there is an
error? I.e., =IF(ERROR.TYPE(A2)=2,"not available,A2) ?

Dave
 
If you want to trap for Div/0 specifically, try
=IF(AND(ISERROR(A2),ERROR.TYPE(A2)=2),"not available",A2)

That will fail if there isn't a #DIV/0! error. If A2 = a number the result
is #N/A: ERROR.TYPE(#N/A)

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top