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: 9
Default For To Next loop

Dear professionals

Does the For ...To .. Next loop have a syntax where I could run 2
different number ranges in the same loop (will illustrate my question by a
fake "code").

For n = 1 To 10 And For n = 21 To 30
... do something
Next n

I guess I could inside the loop, use an IF condition at the beginning and
let the loop ignore part of the numbers, but maybe there is a direct way
also.

-----------------------------------
All the best, and thanks in advance.
Uno Kõrsmaa



 
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 ? again chrisnsmith Excel Discussion (Misc queries) 11 February 24th 09 04:45 AM
Loop ? chrisnsmith Excel Discussion (Misc queries) 6 February 21st 09 03:54 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 12:22 PM.

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"