Sub Compter_encore()
Dim Couleurs, MonDico, C, mRange, Last
Dim Plg
Dim Maxi, iMaxi
Dim DMax As Variant
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Set ws1 = Sheets("Rapport_Intervention")
Set ws2 = Sheets("Indicateur_C")
Set MonDico = CreateObject("Scripting.Dictionary")
'[E:F].ClearContents
Last = ws1.[A65000].End(xlUp).Row
Set mRange = ws1.Range("A2:A" & Last): mRange.Interior.ColorIndex = Null
For Each C In mRange
If C <> "" Then MonDico.Item(C.Value) = MonDico.Item(C.Value) + 1
Maxi = IIf(Maxi > MonDico.Item(C.Value), Maxi, MonDico.Item(C.Value))
iMaxi = IIf(Maxi > MonDico.Item(C.Value), iMaxi, C)
Next C
ws2.[Y17].Resize(MonDico.Count) = Application.Transpose(MonDico.Keys)
ws2.[Z17].Resize(MonDico.Count) = Application.Transpose(MonDico.Items)
Last = ws2.[F65000].End(xlUp).Row
Set Plg = ws2.Range("Y17:Y" & Last)
DMax = Application.Max(MonDico.Items)
Sheets("Indicateur_C").Cells(Last + 2, "Z").Value = DMax
Sheets("Indicateur_C").Cells(Last + 2, "Y").Value = iMaxi
Sheets("Indicateur_C").Range("AB17").Value = DMax
End Sub