Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
accelerate in loop
I'v script do some work.
I'd like accelerate its. I want go to place "do while" (with counter i+1) if VBA perform any/one condition without complete remainder block of if. Any suggestions would be much appreciated Regards Mark Below example: do while ........... if cells(i,...... then ..... end if if cells(i,...... then ..... end if if cells(i,...... then ..... end if i=i+1 loop |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
accelerate in loop
Mark,
Is this what you want? do while ........... if cells(i,...... then ..... elseif cells(i,...... then ..... elseif cells(i,...... then ..... end if i=i+1 loop You could also do a couple of other things to speed it up. 1. If there is a lot of changes to the active window, you could turn off screen updating at the start Application.ScreenUpdating = False Set it back to True at the end. 2. If here are a lot of formulae, if any celss get amended, automatic calculation might be kicking in all of the time. SO turn it off Application.Calculation = xlCalculationManual and set it back to automatic at the en d Application.Calculation = xlCalculationAutomatic -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Mark" wrote in message ... I'v script do some work. I'd like accelerate its. I want go to place "do while" (with counter i+1) if VBA perform any/one condition without complete remainder block of if. Any suggestions would be much appreciated Regards Mark Below example: do while ........... if cells(i,...... then .... end if if cells(i,...... then .... end if if cells(i,...... then .... end if i=i+1 loop |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
accelerate in loop
Its work effect!
Thx Bob for this and another tips. Sincerely Mark -----Original Message----- Mark, Is this what you want? do while ........... if cells(i,...... then ..... elseif cells(i,...... then ..... elseif cells(i,...... then ..... end if i=i+1 loop You could also do a couple of other things to speed it up. 1. If there is a lot of changes to the active window, you could turn off screen updating at the start Application.ScreenUpdating = False Set it back to True at the end. 2. If here are a lot of formulae, if any celss get amended, automatic calculation might be kicking in all of the time. SO turn it off Application.Calculation = xlCalculationManual and set it back to automatic at the en d Application.Calculation = xlCalculationAutomatic -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Mark" wrote in message ... I'v script do some work. I'd like accelerate its. I want go to place "do while" (with counter i+1) if VBA perform any/one condition without complete remainder block of if. Any suggestions would be much appreciated Regards Mark Below example: do while ........... if cells(i,...... then .... end if if cells(i,...... then .... end if if cells(i,...... then .... end if i=i+1 loop . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
getting out of a if loop | Excel Discussion (Misc queries) | |||
Help with Do...Loop | Excel Discussion (Misc queries) | |||
How to create a worksheet to accelerate debts | Excel Worksheet Functions | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |