Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That worked great, thank you very much.
"Lars-Ã…ke Aspelin" wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
If you will never have both years without sales, then try this =IF(A1,(B1-A1)/A1,1) Where A1 is the old year sale's and B1 the new year's sales -- If this helps, please click the Yes button Cheers, Shane Devenshire "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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
Combine logical formulas "if", "and", "or" | Excel Discussion (Misc queries) | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |