Hi,
I'm trying to get the active cell to Offset by ((i - 1) * LR, 0) for each iteration of my loop, until i = LR
i.e. I copy from "sheet 1" move to "JMP Data" sheet, selects B2, then offsets by 0 rows on first iteration, 8 on 2nd, then 16 on 3rd (when LR = 8) pasting after each iteration.
Here's the code:
I tried using
Initially but that didnt work, so i moved to this If statement. This is the first IF statement and loop i've written so is most likey wrong! Any help would be appreciated!
Also, i'm sure the code is very big and clunky but if the solution could be for this code, rather than new one, it would help my learning process greatly.
Thanks!
I'm trying to get the active cell to Offset by ((i - 1) * LR, 0) for each iteration of my loop, until i = LR
i.e. I copy from "sheet 1" move to "JMP Data" sheet, selects B2, then offsets by 0 rows on first iteration, 8 on 2nd, then 16 on 3rd (when LR = 8) pasting after each iteration.
Here's the code:
Code:
Dim i As Integer
Do Until i = LR
i = 1
Sheets(ActiveSheet.Index + 1).Activate
ActiveCell.Offset(1, 0).Select
Range(Cells(ActiveCell.Row, ActiveCell.Column), Cells(ActiveCell.Row, ActiveCell.Column + LC)).Select
Selection.Copy
Sheets("JMP Data").Select
[B]Range("B2").Select
If i - 1 > 0 Then
ActiveCell.Offset(LR * i, 0).Select
Else
End If
[/B] Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
i = i + 1
Loop
I tried using
Code:
ActiveCell.Offset((i - 1) *LR, 0 ).Select
Initially but that didnt work, so i moved to this If statement. This is the first IF statement and loop i've written so is most likey wrong! Any help would be appreciated!
Also, i'm sure the code is very big and clunky but if the solution could be for this code, rather than new one, it would help my learning process greatly.
Thanks!