Bonsoir,
Une proposition 2 colonnes avec procédure événementielle pour le fun.
Bonne année.
Cdlt.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A2:B10")) Is Nothing Then
If Target.Count > 1 Then Exit Sub
Select Case Target.Column
Case Is = 1
Target.Offset(0, 1) = vbNullString
If Target.Value = vbNullString Then Exit Sub
Case Is = 2
On Error GoTo Err_Handler
Application.EnableEvents = False
If Cells(Target.Row, 1) = vbNullString Then
Target.Value = vbNullString
Application.EnableEvents = True
Exit Sub
End If
Select Case Target.Value
Case "Normal"
Target.Value = [Normal] + [Supp] * (Cells(Target.Row, 1) - 1)
Case "Special1"
Target.Value = [Special1] + [Supp] * (Cells(Target.Row, 1) - 1)
Case "Special2"
Target.Value = [Special2] + [Supp] * (Cells(Target.Row, 1) - 1)
End Select
End Select
End If
Application.EnableEvents = True
Exit Sub
Err_Handler:
MsgBox "Erreur " & Err.Number & Chr(10) & "Description : " & Err.Description
Application.EnableEvents = True
Exit Sub
End Sub