[COLOR="DarkSlateGray"][B]Private Sub Worksheet_Change(ByVal Target As Range)
Dim oPlg As Range, oLg As Range, errLg$
If Not Intersect(Target, Columns("A:C")) Is Nothing Then
For Each oLg In Intersect(Target, Columns("A:C")).Rows
Set oPlg = Rows(oLg.Row).Resize(1, 3)
Select Case WorksheetFunction.CountBlank(oPlg)
Case 0
If IsNumeric(oPlg.Value2(1, 3)) And IsNumeric(oPlg.Value2(1, 2)) And IsNumeric(oPlg.Value2(1, 1)) Then
If oPlg.Value2(1, 3) - oPlg.Value2(1, 2) * oPlg.Value2(1, 1) Then errLg = errLg & vbLf & oPlg.Row
End If
Case 1
Application.EnableEvents = False
If oPlg.Value2(1, 3) = "" And IsNumeric(oPlg.Value2(1, 2)) And IsNumeric(oPlg.Value2(1, 1)) Then
oPlg.Cells(1, 3).Value = oPlg.Value2(1, 2) * oPlg.Value2(1, 1)
ElseIf oPlg.Value2(1, 2) = "" And IsNumeric(oPlg.Value2(1, 3)) And IsNumeric(oPlg.Value2(1, 1)) And oPlg.Value2(1, 1) <> 0 Then
oPlg.Cells(1, 2).Value = oPlg.Value2(1, 3) / oPlg.Value2(1, 1)
ElseIf oPlg.Value2(1, 1) = "" And IsNumeric(oPlg.Value2(1, 3)) And IsNumeric(oPlg.Value2(1, 2)) And oPlg.Value2(1, 2) <> 0 Then
oPlg.Cells(1, 1).Value = oPlg.Value2(1, 3) / oPlg.Value2(1, 2)
End If
Application.EnableEvents = True
End Select
Next oLg
If errLg <> "" Then MsgBox "Données erronées ligne(s)" & errLg, vbCritical, "A T T E N T I O N !"
End If
End Sub[/B][/COLOR]