I tried out something like what you are asking about with the Bloomberg DDE
quotes.
I don't think you need vba to do this. You just need to set the iterations
check box in the tools-options-calculation tab section. I will tell you the set
up of the sheet I have prepared. It just involves one function IF.
My setup is this way 'This is not VBA code
Cell A1 = DDE(TIME) 'This is the time input available from your DDE server or
from your own timer.
Cell A2 = DDE(Quote) ' This cell contains the data which is obtained from the
DDE Server. This is the constant updating value.
According to your message your intervals are placed in Horizontal format from
B1 to Z1. No Problem.
In The Cell B2 Enter this function.
=IF(B1<$A$1,B2,$A$2)
Drag this function to the right upto Z1.
Suppose your intervals are 7:00, 7:30, 8:00, 8:30 etc then what this function
will do is compare your time interval with the DDE Time. If it is less than or
equal to 7:00 then the value in B2 will reflect the value at 7:00 (it will make
a copy of the value in the A1). Once the time crosses over into 7:01 then the
next cell C2 gets updated till it reaches 7:30 but hte value in B2 will remain
the same as the value which was present at 7:00. Do not worry it will not
change. This is the property of the Excel iteration function.
I hope this helps you. This is the most simplest way to solve the problem. You
will need VBA only just to automatically save your work or make a copy of your
work into another workbook or worksheet.