Bonjour et merci pour ton aide,
j'ai entré ça dans mon module mais j'ai un message d'erreur qui s'affiche disant
End Sub attendu.
Je ne comprend pas, j'ai bien mis le End Sub et je ne vois pas d'où ça vient
Sub code_couleur()
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("C:C")) Is Nothing Then
Dim Nbr As String
Nbr = Application.CountIf(Range("C2:" & Target.Address), Target.Value)
Target.Offset(0, 1) = Left(Target, 1) & Format(Nbr, "000")
End If
End Sub