View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default Combine an "IF" and "OR" statement

Hi

Assuming your data is in column A and B, In C1
=IF(COUNT(A1:B1)<2,"n/a",B1/A1*100)

This will put n/a in the cell if either (or both) year(s) has no value
Change the "n/a" to "" if you want a blank cell to appear.
--
Regards
Roger Govier

"Picman" wrote in message
...
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.