Try
Sub test()
Dim a, i As Long, x As Range, txt As String, dic As Object
Set dic = CreateObject("Scripting.Dictionary")
dic.CompareMode = 1
Application.ScreenUpdating = False
a = Cells(1).CurrentRegion.Value
For i = 2 To UBound(a, 1)
txt = Join(Array(a(i, 3), a(i, 4), a(i, 5)), Chr(2))
If Not dic.exists(txt) Then
dic(txt) = i
Else
If x Is Nothing Then
Set x = Rows(i)
Else
Set x = Union(x, Rows(i))
End If
If a(i, 1) = "Upd" Then Cells(dic(txt), 1).Value = "Upd"
Cells(dic(txt), 9).Value = Cells(dic(txt), 9).Value + a(i, 9)
End If
Next
If Not x Is Nothing Then x.Delete
Application.ScreenUpdating = True
End Sub
Bookmarks