Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Fin: If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [C9]) Is Nothing Then
Application.ScreenUpdating = False
Application.EnableEvents = False
Dim T, i%, Ligne%
[B16:F1000].ClearContents
With Sheets("ORDERS")
DL = .[A65500].End(xlUp).Row
T = .Range("A1:G" & DL)
Ligne = 16
For i = 2 To UBound(T)
If T(i, 2) = Val(Target) Then
Cells(Ligne, "B") = T(i, 1) 'Code
Cells(Ligne, "C") = T(i, 4) 'Product
Cells(Ligne, "D") = T(i, 7) 'Price
Cells(Ligne, "E") = T(i, 5) 'Number
Cells(Ligne, "F") = T(i, 6) 'Total
Ligne = Ligne + 1
End If
Next i
End With
End If
Fin:
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub