# Thread: ISERROR ?? (Excel 2002)

1. ## ISERROR ?? (Excel 2002)

Hi

I was hoping this would avoid #DIV/0! but it doesn't

=IF((ISERROR(Q20-R20)/R20),0,(Q20-R20)/R20)

2. ## Re: ISERROR ?? (Excel 2002)

Misplaced parenthesis again:

=IF(ISERROR((Q20-R20)/R20),0,(Q20-R20)/R20)

Explanation: you want to see if the result of (Q20-R20)/R20 results in an error. So you look at ISERROR( (Q20-R20)/R20 )

In your formula, ISERROR( Q20-R20 ) only looks at Q20-R20, but that will not result in an error unless Q20 or R20 contains an error value.

3. ## Re: ISERROR ?? (Excel 2002)

Hi Hans

Thank you for your reply and explanation, I will edndeavor to learn from this.

4. ## Re: ISERROR ?? (Excel 2002)

This will always be simpler:

=IF(R20,(Q20-R20)/R20,0)

It uses the denominator's zero or non-zero status as a True/False argument to the IF().

5. ## Re: ISERROR ?? (Excel 2002)

But if either or both Q20 and/or R20 were an error of some kind, it would give an error message. This only eliminates the div/0 error caused by R20 being 0.

Steve

6. ## Re: ISERROR ?? (Excel 2002)

That's true, Steve, but as a matter of style I would either not tolerate an error in a source, or I would tolerate it in both places.

7. ## Re: ISERROR ?? (Excel 2002)

I was just pointing out the difference. I prefer your formula, since it only eliminates the "expected error" from division by zero.

As you imply, if something else caused the error, it would be better to know about it and not "ignore it"...

Steve

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•