Non, je te rassure : tu n'abuses pas ! pour moi aussi, quand j'ai débuté, c'était pas évident !
voici donc les infos complémentaires nécessaires :
Alt F11 ➯ fenêtre de "Microsoft Visual Basic" (qu'on appelle aussi "Éditeur VBA") :
⚠ Dans ton fichier réel, sélectionne la feuille "TRI" même si c'est par exemple Feuil5 au lieu de Feuil2.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Count > 1 Then Exit Sub
If .Address <> "$B$4" Then Exit Sub
If Len(.Value) <> 15 Then Exit Sub
If [B9] = "" Or [B9] = "Référence inconnue" Then Exit Sub
Dim chn$, col%, lig As Byte: chn = RTrim$([D4])
chn = Right$(chn, Len(chn) - InStr(chn, " ")): col = Val(chn) + 1
For lig = 17 To 71 Step 6
chn = Cells(lig, col)
If Len(chn) = 15 Then
If chn = .Value Then
If Cells(lig - 1, col) = [B9] Then
With Cells(lig + 3, col)
If IsNumeric(.Value) Then _
.Value = WorksheetFunction.Max(0, .Value - 1)
Exit Sub
End With
End If
End If
End If
Next lig
End With
End Sub
N'oublie pas de refaire Alt F11 pour retourner sur Excel ; si tu as besoin de plus d'infos, n'hésite pas.
dhany