Afficher un message
Vieux 28/10/2005, 18h51   #3 (permalink)
Nikolaï
XLDnaute Nouveau
 
Date d'inscription: octobre 2005
Messages: 29
Par défaut Re:Commentaire conditionnel

Bonjour Zeltron

Oui bien sur c'est possible mais à mon avis il faut que tu utilises VBA.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Target.Comment.Delete
If Target = 1 Then
Target.AddComment 'Premier Numéro'
Target.Comment.Visible = True
ElseIf Target = 2 Then
Target.AddComment 'Deuxième Numéro'
Target.Comment.Visible = True
ElseIf Target = 3 Then
Target.AddComment 'Troisième Numéro'
Target.Comment.Visible = True
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Target.Comment.Delete
If Target = 1 Then
Target.AddComment 'Premier Numéro'
Target.Comment.Visible = True
ElseIf Target = 2 Then
Target.AddComment 'Deuxième Numéro'
Target.Comment.Visible = True
ElseIf Target = 3 Then
Target.AddComment 'Troisième Numéro'
Target.Comment.Visible = True
End If
End Sub

Voilà, c'est tout ce que je peux pour l'instant ca rje dois partir.
Bon weekend
Christophe
Nikolaï est déconnecté   Réponse avec citation