Calculate a 30-day moving average based on the last x number of entries and date
Assuming that Sheet1, Column B, starting at B2, contains the data, try
the following...
1) Define the following dynamic named range:
Insert Name Define
Name: Values
Refers to:
=Sheet1!$B$2:INDEX(Sheet1!$B$2:$B$65536,MATCH(9.99 999999999999E+307,Sheet
1!$B$2:$B$65536))
Click Ok
Change the references accordingly.
2) Then try the following formula, which needs to be confirmed with
CONTROL+SHIFT+ENTER...
=AVERAGE(IF(ROW(Values)=LARGE(IF(Values,ROW(Value s)),30),IF(Values,Value
s)))
Hope this helps!
In article ,
gimiv wrote:
For this you can use a dynamic named range. Do you need help with this?
Inserting it into an OFFSET in your equation? yes. = ) thanks again for
your help guys.
|