The code below works but does not copy over rows with blank cells, for example "Sheet1" has a total of 35 rows and 56 columns but certain cells are blank e.g. cell A28 & A31, this means the code will copy and paste 33 rows in "Sheet2" which excludes rows 28 and 31 instead of all 35 rows.
How can I change this to copy all 35 rows irrespective of whether it has blank cells or not?
My objective is to copy 10 specific columns for all 35 rows from "Sheet1" which has 56 columns to "Sheet2" which is currently blank and in different column order. Hope this makes sense.
Sub Transfer_Macro ()
'
Dim lastrow As Long, erow As Long
lastrow = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
Worksheets("Sheet1").Cells(i, 1).Copy
erow = Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("Sheet1").Paste Destination:=Worksheets("Sheet2").Cells(erow + 1, 1)
Worksheets("Sheet1").Cells(i, 3).Copy
Worksheets("Sheet1`").Paste Destination:=Worksheets("Sheet2").Cells(erow + 1, 3)
Next i
End Sub