adamsm
04-22-2011, 12:11 AM
Hi,
The following code copies data from columns I and K starting from row 25 to column A of the active sheet.
Sub CopyColumns()
Dim LR1 As Long, LR2 As Long, i As Integer
For i = 9 To 11
LR1 = Cells(Rows.Count, 1).End(xlUp).Row
LR2 = Cells(Rows.Count, i).End(xlUp).Row
Range(Cells(25, i), Cells(LR2, i)).Copy Destination:=Cells(LR1 + 1, 1)
Next i
Application.CutCopyMode = False
End Sub
How could the code be changed so that it would copy the column contents of I and K starting from row 25 to row 33 to column D of the sheet "Data" starting from row5.
Any help on this would be kindly appreciated.
Thanks in advance.
The following code copies data from columns I and K starting from row 25 to column A of the active sheet.
Sub CopyColumns()
Dim LR1 As Long, LR2 As Long, i As Integer
For i = 9 To 11
LR1 = Cells(Rows.Count, 1).End(xlUp).Row
LR2 = Cells(Rows.Count, i).End(xlUp).Row
Range(Cells(25, i), Cells(LR2, i)).Copy Destination:=Cells(LR1 + 1, 1)
Next i
Application.CutCopyMode = False
End Sub
How could the code be changed so that it would copy the column contents of I and K starting from row 25 to row 33 to column D of the sheet "Data" starting from row5.
Any help on this would be kindly appreciated.
Thanks in advance.