Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("F1:F65000")) Is Nothing Then
If Target = "" Then Exit Sub
Ligne = Target.Row
If Target = "OUI" Then
' On fige les valeurs en B et E
Cells(Ligne, "B") = Cells(Ligne, "B").Value
Cells(Ligne, "E") = Cells(Ligne, "E").Value
Else
' NON on met les formules
Cells(Ligne, "B").FormulaR1C1 = "=RC[-1]&"" - ""&RC[3]"
Cells(Ligne, "E").FormulaR1C1 = "=RC[-1]-RC[-2]"
End If
End If
End Sub