LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default For/Loop skipping one value in loop only

G'day guys and girls
Just a quick question, more general programming than VBA specific, and one
that I haven't had to deal with before in any programming.

Example (pseudo code):

For i = 1 to 6
if myvar = true then
if i = 3 then
skip to next i
else
'do my code
end if
end if
Next i

So, in simple terms, I want to skip my processing code if i = 3.
However I included the "if myvar = true" code because I only want to skip
i=3 if a certain condition elsewhere in my workbook is true.

What's the best way to go about this?
Thanks very much
Matt


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Loop Ben Allen Excel Programming 1 May 21st 04 12:07 PM
Do Until Loop pikus Excel Programming 1 May 11th 04 08:46 PM
Worksheet_Change - loop within a loop bgm Excel Programming 1 January 19th 04 01:27 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 11:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"