Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie: stop a FOR NEXT loop
how can I jump out of a for next loop before I get to the top of the series
of numbers? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie: stop a FOR NEXT loop
If <condition Exit For
"Mike H" wrote in message ... how can I jump out of a for next loop before I get to the top of the series of numbers? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie: stop a FOR NEXT loop
Check out Exit in the online help; it's used for this situation (Exit For)
as well as others (Exit Do, Exit Sub, Exit Function, etc.). -- HTH - -Frank Isaacs Dolphin Technology Corp. http://vbapro.com "Mike H" wrote in message ... how can I jump out of a for next loop before I get to the top of the series of numbers? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie: stop a FOR NEXT loop
Rethink your loop control.
Maybe you should not be using a for next loop - maybe a do while loop would be better. Chrissy. "Mike H" wrote in message ... how can I jump out of a for next loop before I get to the top of the series of numbers? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie: stop a FOR NEXT loop
for each cell in Range("A1:A200")
if isempty cell then exit for ' code to execute Next for i = 1 to 1000 if [test condition] then exit for ' code to execute Next i -- Regards, Tom Ogilvy Mike H wrote in message ... how can I jump out of a for next loop before I get to the top of the series of numbers? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop a loop when certain data is found | Excel Discussion (Misc queries) | |||
Real Newbie newbie question | New Users to Excel | |||
VBA Newbie: Help with Do Loop code | Excel Discussion (Misc queries) | |||
Newbie. Please help me find a loop solution | Excel Programming | |||
Newbie. Please help me find a loop solution | Excel Programming |