Private Sub Worksheet_Change(ByVal Target As Range)
Dim c1 As Range, c2 As Range, c3 As Range, c4 As Range, x#, y#
Set c1 = Cells.Find("Total charges", , xlValues)
If c1 Is Nothing Then MsgBox "'Total charges' introuvable...": Exit Sub
Set c2 = Cells.Find("Total produits")
If c2 Is Nothing Then MsgBox "'Total produits' introuvable...": Exit Sub
Set c3 = Cells.Find("Bénéfice")
If c3 Is Nothing Then MsgBox "'Bénéfice' introuvable...": Exit Sub
Set c4 = Cells.Find("Perte")
If c4 Is Nothing Then MsgBox "'Perte' introuvable...": Exit Sub
x = Val(Replace(c1(1, 2), ",", "."))
y = Val(Replace(c2(1, 2), ",", "."))
Application.EnableEvents = False
c3(1, 2) = IIf(x < y, y - x, "")
c4(1, 2) = IIf(x > y, x - y, "")
Application.EnableEvents = True
End Sub