ahuang3433
New Member
- Joined
- Jan 24, 2017
- Messages
- 39
Hi,
I am trying to achieve the following.
- Copy last populated Cell of each of the designated columns and paste up until the last populated row based on Column E referencing.
Current State:
It paste over everything.
I am trying to achieve the following.
- Copy last populated Cell of each of the designated columns and paste up until the last populated row based on Column E referencing.
Current State:
It paste over everything.
VBA Code:
'Copy Data Down (Columns A:D,F:J, & L)
Dim lastRow2 As Long
lastRow2 = Range("E" & Rows.Count).End(xlUp).Row
Range("A1").End(xlDown).Copy Destination:=Range("A2:A" & lastRow2).Offset(1, 0)
Range("B1").End(xlDown).Copy Destination:=Range("B2:B" & lastRow2).Offset(1, 0)
Range("C1").End(xlDown).Copy Destination:=Range("C2:C" & lastRow2).Offset(1, 0)
Range("D1").End(xlDown).Copy Destination:=Range("D2:D" & lastRow2).Offset(1, 0)
Range("F1").End(xlDown).Copy Destination:=Range("F2:F" & lastRow2).Offset(1, 0)
Range("G1").End(xlDown).Copy Destination:=Range("G2:G" & lastRow2).Offset(1, 0)
Range("H1").End(xlDown).Copy Destination:=Range("H2:H" & lastRow2).Offset(1, 0)
Range("I1").End(xlDown).Copy Destination:=Range("I2:I" & lastRow2).Offset(1, 0)
Range("J1").End(xlDown).Copy Destination:=Range("J2:J" & lastRow2).Offset(1, 0)
Range("L1").End(xlDown).Copy Destination:=Range("L2:L" & lastRow2).Offset(1, 0)
Range("O1").End(xlDown).Copy Destination:=Range("O2:O" & lastRow2).Offset(1, 0)