Sub TransferData()
Dim x As Integer
Dim Target As Range
Dim LastRow As Long
Dim R As Long
For x = 30 To 19 Step -1
If sheet2.Range("A" & x).Value = vbNullString Then _
sheet2.Range("A" & x).EntireRow.Delete
Next x
LastRow = sheet1.Cells(.Rows.Count, "A").End(xlUp).Row
Set Target = sheet2.Cells(sheet2.Rows.Count, "A").End(xlUp)
For R = 2 To LastRow
sheet1 .Range(sheet1.Cells(R, 1), sheet1.Cells(R, 5)).Copy _
Destination:=Target.Offset(R - 2)
With Target.Offset(R - 2, 4)
If .HasFormula Then .Value =sheet1 .Cells(R, 5).Value
End With
Next R
On Error Resume Next
Target.Offset(R - 3, 5).Value = WorksheetFunction.Sum(sheet2.Range("E3:E35"))
End Sub