View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers[_2_] Mike Rogers[_2_] is offline
external usenet poster
 
Posts: 284
Default Percentage with a zero involved

tankerman

A few options he

1. =if(iserror(your formula),"",your formula)

2. =if(A1="", "", B1/A1)

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

4. =IF(B1=0,"n/a",A1/B1)

5. =IF(ISBLANK(A1),"",B1/A1)

6. =IF(A1,B1/A1,"")

These are just a few that I found from previous posts by searching for #DIV/0.

Hope this helps

Mike Rgers

"tankerman" wrote:

A1 is this month total
B1 is last months total
C1 is the difference, =A1-B1
This much I got
D1 is the difference in percentage, I use =(A1-B1)/B1 and I get my % in
black or (red) which is fine but now the problem

There are times we don't always handle a certain item so some months will
have a zero in either this month or last months calc and my % is all messed
up i get this #DIV/0 I think this means that you can not divide by zero but
how do I get around this.