Hello,

I have been working on getting a formula/function together for a rolling average. I am having some difficulty getting it all squared away. This is what I am looking at doing

In one sheet I have a database with values corresponding to a specific name and date. Therefore there is several data points corresponding to each specific name. On a separate sheet I am attempting to have the name and two corresponding columns to that name, one with the average of their last seven data points. The second column with the average of the PREVIOUS 28 data points up until the first of the last seven data points. Basically I am looking to compare the last seven days to the last month previous to those seven days. Data will be added frequently so basically it would need to be a rolling average. I was able to get the rolling average function/formula for the last seven days figured, out however the tricky part is figuring out how to get a rolling average of previous 28 days to that. This is the formula I used for the rolling average of the last seven data points. Basically a combo of an if then statement and a rolling average formula.

=IF(Database!C2:C1053=A3,AVERAGE(OFFSET(Database!F2:F1053,COUNTA(Database!F2:F1063)-1,0,-7,1)))



Any help or suggestions would be very much appreciated. I am quite sure that I could be totally off on this and unclear on my description of what I am trying to do.

Thanks again!