time taken to recalculate

  • Thread starter Thread starter scottwilsonx
  • Start date Start date
S

scottwilsonx

Does anyone know if it is possible to set a macro that will monitor th
time it takes a spreadsheet to recalculate itself when the F9 key i
pressed, or when a button is pressed that calls a recalculate macro ?

If anyone has experience of this, then many thanks for your help.

Scott
 
I believe what he is asking is if he's updating a sheet in his macro an
that change will affect many calculations through his sheet(s). Then
he wants to know if he will need to wait/pause before using th
calculations. He doesn't want to go through the whole macro with old
and therefore bad, data because he picked up the calculation value
before they were updated from his previous change. That's probably wh
he wants to time it - then he can pause the macro for that long plu
some buffer.

Jorda
 
you can store the value of now in a variable in line 1 of your code, and
then in the final line of your code deduct the variable from now to
determine time elapsed.

Sub Your_Code()
DIM something as something
DIM StartTime as variant
Startime=now

Your code.......

msg="Time taken is " & Round((Now - starttime) * 24 * 60 * 60, 2) & "
seconds"
msgbox msg
end sub

should display a message with seconds to 2 decimal places
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top