Public Sub ss()
Dim d
Dim i, k
Set d = CreateObject("scripting.dictionary")
k = Cells(3, 1).End(xlDown).Row
For i = 4 To k
If i > k Then Exit For
If d.exists(Cells(i, 1) & Cells(i, 5) & Cells(i, 8) & Cells(i, 21)) Then
Cells(d(Cells(i, 1) & Cells(i, 5) & Cells(i, 8) & Cells(i, 21)), 22) = Cells(d(Cells(i, 1) & Cells(i, 5) & Cells(i, 8) & Cells(i, 21)), 22) + Cells(i, 22)
Rows(i).Delete
k = k - 1
i = i - 1
Else
d(Cells(i, 1) & Cells(i, 5) & Cells(i, 8) & Cells(i, 21)) = i
End If
Next i
End Sub