View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default calculating moving average

Assuming your 2 columns of data (timestamp, value) are in columns A and B

D1 : desired interval (00:05:00)
E1: = start time (eg 11:30:00)
E2: =E1+$D$1
fill down
F1: =VLOOKUP(A1:B999;E1;2;TRUE)
fill down
G1: =AVERAGE(F$1:F1)
fill down

See example: http://cjoint.com/?fomlIQWtNp

HTH
--
AP

a écrit dans le message de news:
...
Hello,

I am trying to calculate a moving average for stock quotes. The problem
is that the time interval is not continuous. I get for example at
11.55.33 a stock quote the next one can be at 11.56.21 and the next at
12.00.21. I want to copy the stock quotes at certain time intervals. So
for example copy the stock quote at every 5 minutes. Save them and than
calculate a moving average. Can anybody help me please?

Kind regards,

John