Thanks:  0
Likes:  0

1. I have a worksheet:

Column B is a value for year 2002
Column C is a value for year 2001
Column D is a percentage of increase or decrease between the two years.

If both B & C are equal to zero I want
zero in column D, otherwise I want the percent of increase or decrease versus year 2001. In no instance to I want a Divide by Zero error.

thanks,

[ This Message was edited by: hal1543 on 2002-05-02 06:54 ]

2. Try something with the following format:

=IF(A1=B1,0,B1/A1)

3. Thanks Al,

I tried your formula, but if A is greater
than zero and B is = zero, I'm getting that
dredded Divide by Zero error.

Hal

4. Give this a whirl:

=IF(c1=0,0,b1/c1)

_________________
Cheers, NateO

[ This Message was edited by: NateO on 2002-05-02 10:57 ]

=if(or(b1=0,c1=0),0,b1/c1)
this way, if either one is zero, you get a zero in return.

6. Here's where we need to step back from Excel and remember our basic arithmetic. If B1 is zero and you divide this by a number greater than zero, the solution is always zero, no need to extend the if statement.

7. Depending on what you divide by what, I'd use Nate's suggestion (a bit shortened):

=IF(C1,B1/C1,0)

or

=IF(B1,C1/B1,0)

## User Tag List

#### Posting Permissions

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