Function Commentaire(Plage As Range) As String
Dim Cel As Range
Dim Dico As Object
Dim Cle As Variant
Dim Com As Comment
Dim Texte As String
Dim Retour As String
Set Dico = CreateObject("Scripting.Dictionary")
For Each Cel In Plage
Set Com = Cel.Comment
If Not Com Is Nothing Then
Texte = Com.Shape.TextFrame.Characters.Text
If Dico.exists(Texte) = False Then Dico.Add Texte, 1 Else Dico(Texte) = Dico(Texte) + 1
End If
Next Cel
For Each Cle In Dico.Keys
If Dico(Cle) > 1 Then Retour = Retour & Cle & "|"
Next Cle
If Retour <> "" Then Retour = Left(Retour, Len(Retour) - 1)
Commentaire = Retour
End Function