hi
i have some data in sheet2 to transfer to sheet4 it works but not completely in sheet2 column a,b,e transfer to sheet4 columns c,e,f but it doesn't transfer all of data relating theses columns and this is my code
Code
Sub copycolumns()
Dim lastrow As Long, erow As Long
lastrow = sheet2.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
sheet2.Cells(i, 1).Copy
erow = sheet4.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
sheet2.Paste Destination:=Worksheets("Sheet4").Cells(erow, 5)
sheet2.Cells(i, 2).Copy
sheet2.Paste Destination:=Worksheets("Sheet4").Cells(erow, 3)
sheet2.Cells(i, 5).Copy
sheet2.Paste Destination:=Worksheets("Sheet4").Cells(erow, 7)
Next i
End Sub
Display More