This should do everything that you asked for. Let me know.
Sub CopyOverQuantity()
Dim ws1 As Worksheet: Set ws1 = Sheets("AllProducts")
Dim ws2 As Worksheet: Set ws2 = Sheets("Invoice")
Dim lastrow As Long, icell As Long, lastrow2 As Long
lastrow = ws1.Range("A" & Rows.Count).End(xlUp).Row
For icell = 4 To lastrow
If Not IsEmpty(ws1.Range("C" & icell)) Then
ws1.Range("A" & icell).Resize(1, 3).Copy Destination:=ws2.Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End If
Next icell
ws2.Range("D5").Formula = "=$B5*$C5*1.05"
lastrow2 = ws2.Range("A" & Rows.Count).End(xlUp).Row
With ws2.Range("D5:D" & lastrow2)
.NumberFormat = "$#,##0.00_);($#,##0.00)"
.FillDown
End With
End Sub
Bookmarks