Sub jz()
Dim ws As Worksheet
Dim x As Long
Dim i As Long
Dim j As Long
Set ws = ActiveSheet
x = ws.[a1].CurrentRegion.Rows.Count
For i = 2 To x
For j = i + 1 To x
If ws.Cells(j, 1) = ws.Cells(i, 1) And ws.Cells(j, 2) = ws.Cells(i, 2) And ws.Cells(j, 3) = ws.Cells(i, 3) And ws.Cells(j, 4) = ws.Cells(i, 4) Then
ws.Cells(i, 5) = Val(ws.Cells(i, 5)) + Val(ws.Cells(j, 5))
ws.Cells(i, 6) = Val(ws.Cells(i, 6)) + Val(ws.Cells(j, 6))
ws.Cells(j, 1).EntireRow.Delete
End If
Next j
x = ws.[a1].CurrentRegion.Rows.Count
Next i
End Sub