Sum first five vaules of changing range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have about 1000 rows of sales data, going back about 2.5 years. I need the
first five months sales for each row, but as they were all launched on
different dates, it's proving tricky.

I'm sure there has to be an easier way to do this than selecting the values
for each row at a time, but just now I can't for the life of me think how to
do it!

Any ideas?
 
I have sales data by month/year, and a release date for each product

eg:

product code date of release Jan-05 Oct-06 May-07Jun-07
1101 01-Dec-04 19 17 6 7
1102 19-Oct-06 22 9 9
1103 07-Sep-06 26 19 13
1104 24-May-07 6 11

hope this helps

Lou
 
not tested but try something like
=sumproduct((month(b2:b22)>=month(b2))*month(b2:b22)<=month(b2)+5)*c2:c22)
 
Back
Top