Set D = CreateObject("Scripting.Dictionary")
For Each a In Range([c1], [c65536].End(xlUp))
If D.exists(a.Value) = False Then
D(a.Value) = Array(a.Offset(, -2).Value, a.Offset(, -1).Value, a.Value, a.Offset(, 1).Value)
Else
ar = D(a.Value)
ar(3) = ar(3) + a.Offset(, 1).Value
D(a.Value) = ar
End If
Next