Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to use i as variable to loop through three ranges, with no luck..
what am I doing wrong? Dim TRange1, TRange2, TRange3 As Range Set TRange1 = Worksheets("Test").Range("B8:H17") Set TRange2 = Worksheets("Test").Range("B20:H29") Set TRange3 = Worksheets("Test").Range("B32:H41") i = 1 For i = 1 To 5 For Each myCell In TRange(i).Cells --do sth here Next i=i+1 next i knut |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop with variable name? | Excel Discussion (Misc queries) | |||
How to set a variable in Excel and loop | Excel Programming | |||
Creating a formula using the loop variable | Excel Programming | |||
Excel VBA Loop & Variable Reference | Excel Programming | |||
Re-assigning the value of a variable for a for loop from | Excel Programming |