Salut Target,
Dans le fichier ci-joint, en utilisant l’instruction TARGET , si tu double-cliques sur un mot de la colonne B, un filtre se met en place sur celui-ci. Si tu double-cliques n’importe où d’autre, le filtre mis en place est annulé.
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim xx As String, DerLig As Long
If Target.Count > 1 Then Exit Sub
DerLig = Range("B" & Rows.Count).End(xlUp).Row
If Application.Intersect(Target, Range("B1:B" & DerLig)) Is Nothing Then
Columns("B:B").AutoFilter
End If
If Not Application.Intersect(Target, Range("B1:B" & DerLig)) Is Nothing Then
xx = Target
Range("$B$1:$B$" & DerLig).AutoFilter Field:=1, Criteria1:=Target, Operator:=xlAnd
End If
End Sub
Cordialement.