gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,332
- Office Version
- 365
- Platform
- Windows
I need to complete this code, but having problems. I want to find the last row of A then copy from B3 down to that last row. Then Paste column B at the bottom of Row A - then I want to do that again for columns C, D... all the way to column Z (Each time only copying down to what the original Last row was for column A).
Thank you for the help, it is appreciated.
Code:
Sub CreateYears()
Dim DMlr1 As Long
'Clear IHSCodwYear table
ClearIHSCodewYearTable
'2010
Dim Lr1 As Long
'Transfer Data from IHS Codes
Sheets("IHS Codes").ListObjects("IHS_Codes").DataBodyRange.Copy Sheets("IHS Codes wYear").Range("A2")
Dim PPlr10 As Long
'Clear existing data if any on PP Materials Input tab
PPlr10 = Sheets("IHS Codes wYear").Cells(Rows.Count, "A").End(xlUp).Row
If PPlr10 > 2 Then Sheets("IHS Codes wYear").Range("B2:B" & PPlr1).Copy
End Sub
Thank you for the help, it is appreciated.