Private Sub Worksheet_Activate()
Worksheet_Calculate 'lance la macro
End Sub
Private Sub Worksheet_Calculate()
Dim P As Range, Q As Range, nlig&, c As Range, i As Variant, x$
Set P = [A3:L33]
Set Q = Sheets("Anniversaire").[A1].CurrentRegion
nlig = Q.Rows.Count
Application.ScreenUpdating = False
P.ClearComments 'RAZ
For Each c In P
i = Application.Match(c.Value2, Q.Columns(2), 0)
If IsNumeric(i) Then
x = ""
For i = 2 To nlig
If Q(i, 2) = c Then x = x & vbLf & Q(i, 1)
Next i
c.AddComment Mid(x, 2) 'ajoute un commentaire
c.Comment.Shape.TextFrame.AutoSize = True 'ajuste les dimensions
End If
Next c
End Sub