Bonjour,
La macro ajustée à ton fichier joint.
Sub test()
For i = 2 To 17
If Cells(i, 4).Value - Cells(i, 2) > Cells(i, 3) Then
Sheets("Feuil1").Cells(i, 5).Value = "NON"
Else
Sheets("Feuil1").Cells(i, 5).Value = "OUI"
End If
Next i
End Sub
La même en couleur :
Sub test()
For i = 2 To 17
Sheets("Feuil1").Cells(i, 5).Value = IIf(Cells(i, 4).Value - Cells(i, 2) > Cells(i, 3), "NON", "OUI")
Next i
End Sub
A+