The following code copies column contents from column I25:I33 to column D and column K25:K33 to column E.
Code: Select all
Sub Copy()
Range("I25:I33").Copy Destination:=Sheets("Datasheet").Range("D" & Rows.Count).End(xlUp).Offset(1, 0)
Range("K25:K33").Copy Destination:=Sheets("Datasheet").Range("E" & Rows.Count).End(xlUp).Offset(1, 0)
End Sub
How could I change the code so that the code copies data to the last empty row of column D only so that the data from column K also gets copied to the same row as with that of the column D.
I hope I've made my question clear.
Any help on this would be kindly appreciated.
Thanks in advance.