Calculating "Weeks of Supply" in Excel

June 30th, 2006

In retail there is an important measure called "Weeks of Supply", which essentially determines how long the current inventory will last based on a future sales forecast.

Calculating Weeks of Supply in Excel is difficult since you have to determine how many cells (weeks) would be added up from the sales forecast before you exceed the current inventory. There aren't any formulas that count cells one at a time until a limit is reached, then return the distance to that cell. There may be a simpler solution to this, but here's what I came up with.

First, I created a new row called "Cumulative Sales". This is just the sales accumulated by week.

Then I entered my Weeks of Supply formula.

* WPG2 Plugin Not Validated *

=SUMPRODUCT(MAX((COLUMN(W$59:$AK59)-COLUMN())*((W$59:$AK59-V$59)<V$56)))

With a generic range:

=SUMPRODUCT(MAX((COLUMN(future_cum_sales_range)-COLUMN())*((future_cum_sales_range-current_week_sales)<current_week_inventory)))

Explanation:

  • SUMPRODUCT is used to generate arrays without actually creating array formulas.
  • I take the column number of each cell in the Sales Forecast and subtract the current week column number. This generates an array that goes 1, 2, 3, 4, 5, etc. beginning with the first week of the future sales forecast.
  • I then subtract past sales in each week from the cumulative sales, which gives me the total forecast (future) sales for all the points in the array.
  • I put in a condition that the points in the array be less than the current week sales. This essentially returns zeroes for weeks beyond the Weeks of Supply.
  • Finally I take the max of the remaining array points. This gives the weeks of supply.
  • Leave a Comment

    *
    Please enter the letters from the displayed image
    Anti-Spam Image

    Some HTML allowed:
    <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

    Trackback this post  |  Subscribe to the comments via RSS Feed


    Other Posts in This Category

    Calendar

    May 2012
    M T W T F S S
    « Aug    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031