Calculating % of Change Across Multiple Years, with Occasiona 0 Values

MrGilder

New Member
Joined
Aug 11, 2011
Messages
1
Hello everyone,
I'm a bit of a novice at this, so hopefully someone will be able to help me.

I am working on a project wherein in must track the percentage of growth across the lifespan of items in 1 year, 3 year, and full lifetime spans.


The sales figures for the item are arranged in order down a single column (I'll say E, in this example). Although the items vary in lifespan and sales data, I'll use an item with a 5 year history for this example. In such a scenario the sales numbers are arranged in E2 - E7 (E2 being the oldest year on record, E7 being most recent). Here is a screenshot:





Uploaded with ImageShack.us



To calculate the percentage change between the two most recent years of sales history, I am using the following formula:

=((E7-E6)/E6)

In order to expand that % across three years, I average the change:

=(((E5-E4)/E4)+((E6-E5)/E5)+((E7-E6)/E6))/3

For the full lifespan, I continue that average to cover the change between each year of the item’s history. For a 5 year lifespan, the formula would look like so:

=(((E3-E2)/E2)+((E4-E3)/E3)+((E5-E4)/4)+((E6-E5)/E5))/4

Where I am running into a problem is when an item has 0 sales for a single period. In going from a year of sales to a year of no sales, it will show an appropriate loss of -100%, however, going from 0 to a year of sales divides by zero and gives me a #DIV/0! Error.

For a single year, I’ve come across an acceptable solutions in using “if” statements. In the below example, assume E6=0:

=if(iserror((E7-E6)/E6),1,((E7-E6)/E6)

This treats the 0 value in such as way at to yield a %100 increase when a number jumps from 0 to any sales number.

Whereas I understand how to apply this to my single year calculations, I do not understand how to write a formula for my 3 year and full lifespan. It has come to my attention that you can “nest” if statements, which seems like it would be a solution; however, I’ve also read that you can only nest up to 7 if statements . . . which presents a problem for items with longer sales histories (they go up to 8 years).

Can anyone help me out?



 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top