j'ai essayer ca mais ca plante
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If [c6:nc6] = 21 Then
alerte.Show 'macro à lancer
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("c6:nc6")) Is Nothing Then
If Target.Value = "21" Then alerte.Show
End If
End Sub
j'ai apporté des modifications mais quand je supprime ca plante
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("c6:nc6")) Is Nothing Then
If Target.Value = "21" Then alerte.Show
If Target.Value = "21ND" Then alerte.Show
If Target.Value = "10ND" Then alerte.Show
If Target.Value = "10" Then alerte.Show
If Target.Value = "0HP" Then alerte.Show
If Target.Value = "21ND" Then alerte.Show
If Target.Value = "FP" Then alerte.Show
If Target.Value = "33" Then alerte.Show
If Target.Value = "DE" Then alerte.Show
If Target.Value = "41" Then alerte.Show
If Target.Value = "RM" Then alerte.Show
If Target.Value = "synd" Then alerte.Show
If Target.Value = "AKPS" Then alerte.Show
If Target.Value = "AKSC" Then alerte.Show
If Target.Value = "GT EX" Then alerte.Show
If Target.Value = "GT Pro" Then alerte.Show
If Target.Value = "SEM" Then alerte.Show
End If
If Not Application.Intersect(Target, Range("c7:nc7")) Is Nothing Then
If Target.Value = "21" Then alerte2.Show
If Target.Value = "21ND" Then alerte2.Show
If Target.Value = "10ND" Then alerte2.Show
If Target.Value = "10" Then alerte2.Show
If Target.Value = "0HP" Then alerte2.Show
If Target.Value = "21ND" Then alerte2.Show
If Target.Value = "FP" Then alerte2.Show
If Target.Value = "33" Then alerte2.Show
If Target.Value = "DE" Then alerte2.Show
If Target.Value = "41" Then alerte2.Show
If Target.Value = "RM" Then alerte2.Show
If Target.Value = "synd" Then alerte2.Show
If Target.Value = "AKPS" Then alerte2.Show
If Target.Value = "AKSC" Then alerte2.Show
If Target.Value = "GT EX" Then alerte2.Show
If Target.Value = "GT Pro" Then alerte2.Show
If Target.Value = "SEM" Then alerte2.Show
End If
Essayez d'expliquer l'entièreté de ce que vous voulez faire. Ce sera plus facile et de poster le fichier avec le code car dans votre fichier il n'y a pas le code que je vous ai proposé
Sinon à essayer pour mettre entre la ligne 6 et 11.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("c6:nc11")) Is Nothing Then
Select Case Target.Value
Case Is = "21", "21ND", "10ND", "OHP", "FP", "33", "DE"
alerte.Show
End Select
End Sub
Je ne peux pas faire ça car sur la ligne c6:nc6 c’est alerte.show
Et la ligne c7:nc7 c’est alerte2.show
J’ai été obligé de le modifier par contre ça plante je sais pas pourquoi
Mais le côté plus simple m’interrese merci encore
j'aime bien ta simplicité
Re..
En C12 tu peux utiliser ceci
=SI(OU(C$5="M";C$5="A";C$5="N");NB.VIDE(C$6:C$11);"")
Et tirer vers la droite
au lieu de
=SI(C5="M";NB.VIDE(C6:C11);SI(C5="A";NB.VIDE(C6:C11);SI(C5="N";NB.VIDE(C6:C11);"")))