Option Explicit
Sub groupe()
Dim tableau, dic, i&, c&, ligne, x&
Set dic = CreateObject("scripting.dictionary")
tableau = Range("A2:D" & Cells(Rows.Count, "A").End(xlUp).Row).Value
ReDim tableau2(Rows.Count - 1, 4)
For i = 1 To UBound(tableau, 1)
If Not dic.exists(tableau(i, 1)) Then
dic(tableau(i, 1)) = Join(WorksheetFunction.Index(tableau, i, 0), ",")
x = x + 1
Else
ligne = Split(dic(tableau(i, 1)), ",")
For c = 1 To 3
ligne(c) = Val(ligne(c)) + Val(tableau(i, c + 1))
Next
dic(tableau(i, 1)) = Join(ligne, ",")
End If
Next
With [F2].Resize(dic.Count, 1)
.Resize(, 4).Value = ""
.Value = Application.Transpose(dic.items)
.TextToColumns Destination:=.Cells(1), DataType:=xlDelimited, Comma:=True
End With
End Sub