skip to next from if
Label the Next statement at the bottom of the loop (be sure to include
the colon after the label):
For index = StartValue to EndValue
If Condition1 then goto NextLoop
If Condition2 then goto NextLoop
If Condition3 then goto NextLoop
DoSomethingIfAllConditionsAreFalse
NextLoop:
Next index
Even if you tab in to enter the statement label ("NextLoop" in this
case), Excel will outdent the label to column 1 after you finish
entering the statement (when you press Enter).
--
Regards,
Bill Renaud
|