Sub FrequencyKPI2()
tablo = Sheets("Feuil1").Range("A2:L" & Sheets("Feuil1").Range("A" & rows.count).End(xlUp).Row)
Set Dico = CreateObject("Scripting.dictionary")
For n = LBound(tablo, 1) To UBound(tablo, 1)
X = tablo(n, 3) & "|" & tablo(n, 5) & "|" & tablo(n, 7)
Dico(X) = Dico(X) + 1
Next
a = Dico.keys
b = Dico.items
ligne = 2
Sheets("Feuil1").Cells.ClearContents
Sheets("Feuil1").Cells(1, 1) = "Types de véhicules"
Sheets("Feuil1").Cells(1, 2) = "N° série"
Sheets("Feuil1").Cells(1, 3) = "Types réparations"
Sheets("Feuil1").Cells(1, 4) = "Coûts"
Sheets("Feuil1").Cells(1, 5) = "Frequency"
For n = LBound(a) To UBound(a)
Sheets("Feuil1").Cells(ligne, 1) = Split(a(n), "|")(0)
Sheets("Feuil1").Cells(ligne, 2) = Split(a(n), "|")(1)
Sheets("Feuil1").Cells(ligne, 3) = Split(a(n), "|")(2)
Sheets("Feuil1").Cells(ligne, 4) = Split(a(n), "|")(3)
Sheets("Feuil1").Cells(ligne, 5) = b(n)
ligne = ligne + 1
Next
Sheets("Feuil2").Select
End Sub