Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing variable in a loop
I don't know why I can't figure this out. I have a lot of variables
already defined A1, A2, A3 etc etc. I'm running a loop and would like to call the needed variable like this For i= 1 to 100 LR = Lastrow + i Range("A"& LR) = A & i - G & i next is this not possible or something? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing variable in a loop
Sub TheBeesKnees()
Dim i As Long Dim LR As Long Dim G As Long Dim A As Long Dim LastRow As Long A = 5 G = 10 LastRow = 15 For i = 1 To 100 LR = LastRow + i Cells(LR, 1).Value = A + i - G + i Next 'i End Sub Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "JeffMelton" wrote in message... I don't know why I can't figure this out. I have a lot of variables already defined A1, A2, A3 etc etc. I'm running a loop and would like to call the needed variable like this For i= 1 to 100 LR = Lastrow + i Range("A"& LR) = A & i - G & i next is this not possible or something? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Variable cell referencing | Excel Worksheet Functions | |||
Referencing tab based on Variable | Excel Worksheet Functions | |||
Help with referencing variable range | Excel Programming | |||
Referencing cells in a loop | Excel Programming | |||
Referencing variable | Excel Programming |