How to automatically create a 12 months continuing rolling average

Corried

Board Regular
Joined
Dec 19, 2019
Messages
217
Office Version
  1. 2019
Platform
  1. Windows
  2. Web
As date comes in. How can I have a continuous rolling moving average from the last cell, going forward?

See my error below on cell "D"
How can fix this?

This in advance.

x.PNG
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
If your title is correct and you were putting your formula in D64 then you would possibly look at something like
VBA Code:
=AVERAGEIFS($C$53:$C$64,$A$53:$A$64,"<="&A64,$A$53:$A$64,">="&DATE(YEAR(A64)-1,MONTH(A64),DAY(A64)))
if you were averaging column C based on the dates in column A.

Please note that it is very hard to tell what the cells in your range are referring to and it is not possible to copy paste your data into Excel so we would have to retype your data to test.
Please look into using the boards XL2BB app if you need to post screenshots of your ranges in future.
 
Upvote 0
If your title is correct and you were putting your formula in D64 then you would possibly look at something like
VBA Code:
=AVERAGEIFS($C$53:$C$64,$A$53:$A$64,"<="&A64,$A$53:$A$64,">="&DATE(YEAR(A64)-1,MONTH(A64),DAY(A64)))
if you were averaging column C based on the dates in column A.

Please note that it is very hard to tell what the cells in your range are referring to and it is not possible to copy paste your data into Excel so we would have to retype your data to test.
Please look into using the boards XL2BB app if you need to post screenshots of your ranges in future.

I made a mistake As date comes in. How can I have a continuous 12 month rolling moving average from the last cell, going forward?

In other words. I want excel to capture the last 11 values on cell "C" plus the current value that makes it 12 months. How could this be done?
 
Upvote 0
D64 with the formula I posted would be the last cell if your range was A53:C64 as you stated. Please note that the formula I posted doesn't take the last 12 values, it takes any data which is one year less than the date in column A.
 
Upvote 0
You mean "C53:C64" will give it a try

No I meant what I stated as your dates are in column A. So you are Averaging C53:C64 based on A53:A64 if you need to have a bigger range for future use raise the 64 to whatever, it won't affect the average until you add a date to column A.
 
Upvote 0
1577933674495.png


The range I stated above was & error. I am incorrect with the formula. I am sorry for the inconvenience cause. Let's slow it down a little if you are comfortable with it, and recap.
I looking for an continuous moving average.
"Beginning"
at the current date in this case: "11/1/2019" and going back to "12/1/2018" .
The cell values should reference to "C53" value "52.90" To "C43" value 51.50

As new data plugin, example:"12/1/2019" data should go back to "1/1/2019". and so forth...
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

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