Assistance with 28 day rolling average

jmomich

New Member
Joined
Sep 24, 2014
Messages
4
Hello - I wonder is somebody can help with a formula to calculate a 28 day rolling average? I have dates in rows across the top, about 90 days worth of data now. I also have a couple of weeks of empty days that I hide; this is so that I don't have to add a new column each day, I just unhide a single column the next morning when I need to add more data. The actual data starts in D5, and the columns with data go to BV5 at this point, however as mentioned I have empty columns hidden that go all the way to CM5. I want to be able to calculate the average of the last 28 days in the rows, in order to show a rolling average.

I've tried using =AVERAGE(OFFSET($D$5,COUNTA($D5:$CM35)-28,0,COUNTA($D5:$CM35)-27,1))

I've also tried using Index and Match in a couple of other attempts.

Any help would be appreciated.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try this:

=AVERAGE(OFFSET(D5,0,COUNT(D5:CM5)-27,30,28))

This will work if you are adding data from left to right. After re-reading your question, I am suspecting that you are inserting columns and adding data to the left most side. If this is the case, the formula will have to be revised.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,552
Messages
6,114,278
Members
448,559
Latest member
MrPJ_Harper

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