I'm testing your script on a 64 bit Windows 7, 32 bit Excel 2007 on a Sony Laptop.
I've modified your code to put an exit counter into each loop (as I suggested earlier). For the sake of testing, each loop will drop out at 20,000 iterations. It produces Debug output every 1000 iterations.
This is the amended code:
and this is the output in the Immediate Window:
As you can see, I get no output from the second loop and only one entry for the third loop. However, loops one and four go all the way ... and would, no doubt, go a lot further. In fact, I stopped the first loop after 30,000 iterations in early testing.
I don't understand the calculations so I can't interpret the result. But, they are oscillating and, possibly, may never meet the exit criterion. Hence the reason for the "get out of jail" Exit Counter. This works but I really don't know if the results are then valid.
See the amended workbook.
Regards, TMS
Bookmarks