View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ryan H Ryan H is offline
external usenet poster
 
Posts: 489
Default For-next loop question

Change the If...Then statement to False. If its, True it will go to the next
x. Hope this helps! If so, let me know, click "YES" below.

For x = 1 to 11
If condition = False then
next x
End if
Next x

--
Cheers,
Ryan


"Luke" wrote:

I have a for-next loop, within which I want to check to see if a certain
condition is true. If it is true, I want to skip the rest that particular
iteration and move on to the next one in the loop. I tried code that looked
like the following, but it just gave me a "next without for" error:

For x = 1 to 11
If condition = true then
next x
End if
Next x

I want to do this without using a GoTo statement. Any suggestions?