View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike[_65_] Mike[_65_] is offline
external usenet poster
 
Posts: 32
Default Macro to re-calcluate and count times run

thanks

mike

"Peter Atherton" wrote in message
...
Mike

I'd try something like
Do while
conditions here
count = count +1

code here
loop

msgbox count

End sub
and place this at the start of the loop
-----Original Message-----
I'm looking for a basic macro that re-calculates the

formula in a
spreadsheet until a certain condition is met (i.e. a

solution found, being a
"yes" value in a particular cell) but counts the number

of times it takes
before that condition is met, and then stops

recalculating and returns the
result plus the number of times that the scenario had to

be run before a
solution was found. The expected number of attempts will

probably be less
than 20.

Any suggestions?

Thanks in advance

Mike


.