View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
salut salut is offline
external usenet poster
 
Posts: 31
Default Calculate a 30-day moving average based on the last x number of en

Assume your last row is 1000
Then your average of the value in the second column for the last 30 days
would be:

=Average(Offset(B1000,0,0,-30,1))


"gimiv" wrote:


Hello, I have a worksheet that has all weekday dates in column 1 and
values in column 2. I want to create a 30-day moving average based on
the last (non-zero) value in the column 2. Since every month has a
different amount of days, I want it to search the date that has the
last value (since I don't get a chance to update it daily) and go back
thirsty days from that date and give an average of all the column 2
values skipping and values that are null or zero.

Any ideas?

Thanks,

Gimi


--
gimiv
------------------------------------------------------------------------
gimiv's Profile: http://www.excelforum.com/member.php...o&userid=35726
View this thread: http://www.excelforum.com/showthread...hreadid=558670