Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Fin: If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [C1:C4]) Is Nothing Then
Application.ScreenUpdating = False
On Error GoTo Fin
Set F = Sheets("Classe " & Replace([C1], ",", ".")) ' Quelle feuille ?
C = Application.Match([C2], F.[2:2], 0) ' Quelle colonne ?
L = Application.Match([C3], F.[A:A], 0) ' Quelle ligne ?
Classe = Application.Match([C4], F.Range(F.Cells(L, 2), F.Cells(L + 3, 2)), 0) ' Quelle classe ?
L = L + Classe - 1 ' Ligne avec Diamètre+Classe
Application.EnableEvents = False
[C5] = F.Cells(L, C) & " Nm" ' Copie des trois valeurs T, Fmin, Fmax
[C6] = F.Cells(L, C + 1)
[C7] = F.Cells(L, C + 2)
Application.EnableEvents = True
Exit Sub
End If
Fin:
[C5:C7].ClearContents ' Si non trouvé, on efface tout.
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub