Determining when calculation has completed

D

DavidS

Hello, I have a calculation that can take about 20 seconds to complete. I
then need to use the answer as an input to another program outside of Excel.
The problem I have is knowing when the calculation has finished so I know
I'm reading the most recent answer. Ideally, I'd like to set a value in a
cell that I can test so I know the last calculation is complete. Is this
possible or is there a better way. Thank you for your help. David
 
D

DavidS

The formula is a dll file that has a proprietary algorithm so I don't know
what its doing. I do know it uses 30 columns in Excel and its calculation is
based over 40 previous readings. Another reading comes into Excel every 5
minutes and an output is calculated. The output is sent to a program that
plots this data with other data. I have some control over the program that
plots the data but I can't ask it to wait for 20 seconds before it reads the
output in Excel. I could ask it to read Excel based upon a flag or
condition. I'm trying to find this i.e. something that says Excel processing
is complete and therefore calculation relates to the last 5 minute reading.
Without this, the chart program just reads Excel when the 5 minute data is
sent to Excel so it picks up the last calculation. I hope this makes sense.
Thanks, David
 
P

Pete_UK

How are you invoking the algorithm? Presumably you have some macro
which updates Excel with the new reading then calls the algorithm, so
can't you incorporate the flag cell into your macro? - something like
receive new value, clear flagged cell, invoke algorithm, reset flagged
cell when complete, call graphing program.

Hope this helps.

Pete
 
D

DavidS

Pete, the algorithm is a dll file that has been registered in Excel. When
data is placed in a cell, Excel calls the dll and places the output in
another cell. There is a macro but I'm not sure that if I add a flag it will
be seen before or after the calculation completes but its worth
investigating. I may settle for putting each output in a new row. I can then
check the expected row for a result. Thanks
 
Top