Option Explicit
Dim derlig As Long, derlig2 As Long, i As Long, plage As Range, tablo(), tbl()
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Application.ScreenUpdating = False
derlig2 = Range("a" & Rows.Count).End(xlUp).Row
Set plage = Range("a1:v" & derlig2)
plage.AutoFilter Field:=ActiveCell.Column, Criteria1:=ActiveCell.Value, Operator:=xlAnd
Cancel = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
derlig = Range("a" & Rows.Count).End(xlUp).Row
tablo = Range("a2:i" & derlig)
tbl = Range("g2:v" & derlig)
On Error Resume Next
derlig2 = Range("a" & Rows.Count).End(xlUp).Row
Set plage = Range("a1:v" & derlig2)
plage.AutoFilter
If Not Intersect(Target, Columns("J:J")) Is Nothing Then
Feuil2.Range("a2:c65536").ClearContents
For i = 1 To UBound(tablo, 1)
Feuil2.Cells(i + 1, "A") = tablo(i, 1)
Feuil2.Cells(i + 1, "B") = tablo(i, 2)
Feuil2.Cells(i + 1, "C") = tablo(i, 9)
Next i
End If
If Not Intersect(Target, Columns("W:W")) Is Nothing Then
Feuil3.Range("a2:c65536").ClearContents
For i = 1 To UBound(tbl, 1)
Feuil3.Cells(i + 1, "A") = tbl(i, 1)
Feuil3.Cells(i + 1, "B") = tbl(i, 5)
Feuil3.Cells(i + 1, "C") = tbl(i, 16)
Next i
End If
End Sub