Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
Thanks for all the replies - but maybe I should start from scratch and explain the question in, hopefully, a clearer way [ sorry if I confused everyone] In A1 I have '=Countif(B1:B500,15)' The integer values in cells B1:B500 get incremented with each sheet recalc due to random functions elsewhere in the sheet and therefore A1 is incremented randomly with each recalc. The macro is required to recalculate the sheet until A1 = 'exactly' 100. - i.e when there are exactly 100 cells in B1:B500 with a value of 15. So I wrote Do Until Range("a1") = 100 ' Do Stuff Calculate Loop The problem is that A1 can be incremented in irregular steps - e.g. from 1 to 2 to 6 etc. and from 93 to 94 to 99 to 102 etc. and therefore a1=100 is never true - hence a permanent loop But I need to restart the Do Until loop if and when A1 exceeds 100. [BTW I can handle the resetting of the values in B1:B500 with a small routine between 'Loop' and 'End'] Thanks again Jack |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to restart a code upon vbno | Excel Discussion (Misc queries) | |||
HOW TO RESTART COUNT FORMULA | Excel Discussion (Misc queries) | |||
HOW TO RESTART COUNT FORMULA | Excel Discussion (Misc queries) | |||
Won't restart after close | Excel Discussion (Misc queries) | |||
Automatic Updates should not be able to restart your computer when | Excel Discussion (Misc queries) |