Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
skip to next from if
I have several If statements inside a for....next loop, how do I
skip to next when an if condition is met? For some condition if a condition is met then skip to next end if if... something here end if if ... something here end if next |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Skip weekends | Excel Worksheet Functions | |||
using IF to skip | Excel Worksheet Functions | |||
If Cannot find skip??? | Excel Programming | |||
Skip over a particular error | Excel Programming | |||
Skip a day of the week | Excel Discussion (Misc queries) |