Sub TotaliserClients()
Dim ws As Worksheet
Dim i As Long
Dim dict As Object
Dim Key As Variant
Dim arr(1) As Double
Set ws = ThisWorkbook.Sheets("Feuil1") 'Changer si besoin
Set dict = CreateObject("Scripting.Dictionary")
'On démarre à la ligne 2
For i = 2 To ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
'Si le code existe dans le dictionnaire, on additionne B et C
If dict.Exists(ws.Cells(i, "A").Value) Then
arr(0) = dict(ws.Cells(i, "A").Value)(0) + ws.Cells(i, "B").Value
arr(1) = dict(ws.Cells(i, "A").Value)(1) + ws.Cells(i, "C").Value
dict(ws.Cells(i, "A").Value) = arr
Else
' Sinon on ajoute le code au dictionnaire
arr(0) = ws.Cells(i, "B").Value
arr(1) = ws.Cells(i, "C").Value
dict.Add ws.Cells(i, "A").Value, arr
End If
Next i
'Effacement plage F2 à H
ws.Range("F2:H" & ws.Cells(ws.Rows.Count, "F").End(xlUp).Row).ClearContents
'Ecriture totaux
i = 2
For Each Key In dict.Keys
ws.Cells(i, "F").Value = Key
ws.Cells(i, "G").Value = dict(Key)(0)
ws.Cells(i, "H").Value = dict(Key)(1)
i = i + 1
Next Key
End Sub