Sub es()
Dim t(), i As Long, m As Object, c As Byte, z
Set m = CreateObject("Scripting.Dictionary")
t = Range("a2:i" & Cells(Rows.Count, 1).End(3).Row)
For i = 1 To UBound(t)
z = t(i, 4)
If m.Exists(z) Then
t(m(z), 1) = t(m(z), 1) + t(i, 1)
t(m(z), 9) = t(m(z), 9) + t(i, 9)
Else
x = x + 1
For c = 1 To 9: t(x, c) = t(i, c): Next c: m(z) = x
End If
Next i
[j2].Resize(x, 9) = t
End Sub