Hi everyone, I am after a way to average a certain number of cells dependent on a number in another cell.

Basically I have five years of weekly data and I want to be able to average the year to date for each year. In other words, in the current year I have a count formula in a cell to count how many weeks have data in it. I then average the year to date data by the number in this cell (the number of weeks that have data in them).

I want to be able to average the previous years data up until the current week as well so that we can see where we are sitting compared to previous years at the same point.

Say if we are up to week 20, I only want to take the data from weeks 1 - 20 of the previous years and average by 20 weeks.

I am not sure if this possible but I wanted to put the idea out there and see if anyone can help.

I would really appreciate any advice.

Thanks, Rosie