Bonsoir Pitou,
Je te propose :
Private Sub Worksheet_Change(ByVal Target As Range)
Dim L As Integer
If Not Application.Intersect(Target, Range("C1:C300")) Is Nothing Then
L = Target.Row
Select Case Target.Value
Case Is = 1: Cells(L, 4).Value = Cells(L, 1) * Cells(L, 2)
Case Is = 2: Cells(L, 5).Value = Cells(L, 1) * Cells(L, 2)
Case Is = 3: Cells(L, 6).Value = Cells(L, 1) * Cells(L, 2)
Case Is = 4: Cells(L, 7).Value = Cells(L, 1) * Cells(L, 2)
End Select
End If
End Sub
Mais on peut faire plus simple :
Private Sub Worksheet_Change(ByVal Target As Range)
Dim L As Integer, C As Integer
If Not Application.Intersect(Target, Range("C1:C300")) Is Nothing Then
L = Target.Row
C = Target.Value
If C > 0 And C < 5 Then Cells(L, C + 3).Value = Cells(L, 1) * Cells(L, 2)
End If
End Sub
Cordialement,
Didier_mDF