View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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?