View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default Combine an "IF" and "OR" statement

On Fri, 2 Jan 2009 09:22:00 -0800, Picman
wrote:

I need to calculate the % difference between 2 years of sales, however one
year or the other may be a zero value (ie new customer this year or old one
last year that has no sales this year). Zero sales last year with sales this
year = 100% or sales last year with zero sales this year = -100%, or if there
are sales in both years calculate the % difference.


Last year in column A, this year in column B.

Try this formula in e.g. column C:

=IF(A1=0,100%,IF(B1=0,-100%,(B1-A1)/A1*100%))

Hope this helps / Lars-Åke