Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("simulateur").Unprotect "toto"
Application.ScreenUpdating = False
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("K4")) Is Nothing Then
Range("S6") = Range("Y50")
Range("F27").FormulaLocal = "=SIERREUR(RECHERCHEV(S6;A147:B162;2;Faux);""<10 ans"")"
End If
If Not Intersect(Target, Me.Range("S6")) Is Nothing Then
'Range("F27").FormulaLocal = "=SIERREUR(RECHERCHEV(S6;A147:B162;2;Faux);""<10 ans"")"
'End If
If Not Intersect(Target, Me.Range("Y6")) Is Nothing Then
Range("F27").FormulaLocal = "=SIERREUR(RECHERCHEV(S6;A147:B162;2;Faux);""<10 ans"")"
End If
If Not Intersect(Target, Me.Range("F27")) Is Nothing Then
If Range("F27").Value < FormulaLocal = "=SIERREUR(RECHERCHEV(S6;A147:B162;2;Faux);""<10 ans"")" Then
MsgBox "Attention ! " & Chr(10) & Chr(10) & "Le résultat saisit est inférieur à " & Range("B162").Value & " €, vbInformation + vbOKOnly
Else
If Range("S6").Value <> Range("Q49").Value Then
MsgBox "Attention ! " & Chr(10) & Chr(10) & "Ce montant ne correspond pas, vbInformation + vbOKOnly
End If
End If
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
Worksheets("simulateur").protect "toto"
End Sub