Bonjour,
Voici ma formule
Si k6-k7 > 2
Si oui, je veux qu'un msgbox s'ouvre et donne un message
Si non : rien
et je veux la même chose K8-K9 ....
Je n'y arrive pas!
merci à l'avance!
Dim Lign As Long For Lign = 6 To 10 Step 2 If "K"Lign - "K"Lign + 1 > 2 Then MsgBox End If Next
Private Sub Worksheet_Change(ByVal Target As Range)
Dim resultat
If (Not Intersect(Target, Range("K6:K7")) Is Nothing) Then
If Range("K6").Value - Range("K7").Value > 2 Then
MsgBox "(1) Supérieur à 2"
End If
End If
If (Not Intersect(Target, Range("K8:K9")) Is Nothing) Then
If Range("K8").Value - Range("K9").Value > 2 Then
MsgBox "(2) Supérieur à 2"
End If
End If
End Sub
--
Private Sub Worksheet_Change(ByVal Target As Range)tous les tests sur les intersections.
Combien cela coûte-t-il au total ? Quelles aides apportent l'état et les acteurs du marché pour alléger cette charge non choisie ? Tous les détails sur Commentçamarche.net.