Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
RANGE & NESTED LOOPS
I have three questions ----
(1)Does the range mycell after the "Each" in For Each mycell in SomeRange always have to refer to one cell at a time in SomeRange? If not, if I wanted mycell to refer to a range consisting of multiple cells in SomeRange, how do I do that? (2)In general, when dealing with nested looping constructs how do I determine which loop is the inner loop and which is the outer? I sometimes have a problem with picturing how to construct nested loops.Any tips or aids or recommendations which would assist me picture and easily construct nested loops would be appreciated. (3) Lastly, what's the difference between myrange=0 and myrange.value=0 Thanks. Jay Dean *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
RANGE & NESTED LOOPS
Jay,
1) Under most circumstances, mycell will refer to a single cell. To be sure use For Each mycell In SomeRange.Cells 2) Indentation is the easiest way to tell what code is in what loop. 3) There is no difference. Value is the default property of Range, so you may leave off the .Value if you so desire. I usually include it for clarity. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "jay dean" wrote in message ... I have three questions ---- (1)Does the range mycell after the "Each" in For Each mycell in SomeRange always have to refer to one cell at a time in SomeRange? If not, if I wanted mycell to refer to a range consisting of multiple cells in SomeRange, how do I do that? (2)In general, when dealing with nested looping constructs how do I determine which loop is the inner loop and which is the outer? I sometimes have a problem with picturing how to construct nested loops.Any tips or aids or recommendations which would assist me picture and easily construct nested loops would be appreciated. (3) Lastly, what's the difference between myrange=0 and myrange.value=0 Thanks. Jay Dean *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nested if using range names | Excel Worksheet Functions | |||
Help with nested for loops | Excel Discussion (Misc queries) | |||
Help with nested for loops | Excel Worksheet Functions | |||
Max limit of 7 nested loops | Excel Worksheet Functions | |||
Non Contiguous range and loops | Excel Programming |