I am trying to add a command of copy range B2:O2 (in ws; TMHP-PL) to range of P2:to last used column (also in TMHP-PL ws)
The last column used is actually shown on row 3
The procedure goes like this but I am only able to copy/paste partially:
Sub CopyPasteAcrossColumnsFINAL2()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("structure")
LR = .Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
.Range("A" & i).Copy Destination:=Sheets("TMHP-PL").Cells(3, 14 * i - 12).Resize(, 13)
Next i
End With
Dim LC As Long
LC = Cells(3, Columns.Count).End(xlToLeft).Column
Range("B2:O2").Copy
Range(Cells(2, 16), Cells(2, LC)).PasteSpecial Paste:=xlPasteFormulas
End Sub
The last column used is actually shown on row 3
The procedure goes like this but I am only able to copy/paste partially:
Sub CopyPasteAcrossColumnsFINAL2()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("structure")
LR = .Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
.Range("A" & i).Copy Destination:=Sheets("TMHP-PL").Cells(3, 14 * i - 12).Resize(, 13)
Next i
End With
Dim LC As Long
LC = Cells(3, Columns.Count).End(xlToLeft).Column
Range("B2:O2").Copy
Range(Cells(2, 16), Cells(2, LC)).PasteSpecial Paste:=xlPasteFormulas
End Sub