Private Sub worksheet_Activate()
Dim d As Object, tablo, i%, s
Set d = CreateObject("Scripting.Dictionary")
d.CompareMode = vbTextCompare 'la casse est ignorée
tablo = Sheets("Feuil1").[B3].CurrentRegion.Resize(2) 'matrice, plus rapide, au moins 2 éléments
For i = 1 To UBound(tablo, 2)
s = Split(Trim(tablo(1, i)))
If UBound(s) > -1 Then d(s(0)) = d(s(0)) + 1
Next
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [C3] 'cellule à adapter
If d.Count Then
.Resize(d.Count) = Application.Transpose(d.keys)
.Offset(, 1).Resize(d.Count) = Application.Transpose(d.items)
.Resize(d.Count, 2).Sort .Offset(, 1), xlDescending, .Cells, , xlAscending, Header:=xlNo 'tri sur 2 colonnes
End If
.Offset(d.Count).Resize(Rows.Count - d.Count - .Row + 1, 2).ClearContents 'RAZ en dessous
End With
Columns.AutoFit 'ajustement largeurs
End Sub