appliquer un filtre sur la feuille "Appels" et puis doubleclick sur un valeur de la feuille "Nr_à_Rechercher"
dans la module de "Nr_à_rechercher"
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("B:C")) Is Nothing Then Exit Sub 'doubleclick dans colonnes B:C
If Target.Value = "" Then Exit Sub 'cellule n'est pas vide
Cancel = True
Montrer Target.Value 'montrer les lignes avec ce valeur
Application.StatusBar = Target.Value & " okay"
End Sub
dans une module normale
Sub Montrer(sTexte)
Set dict = CreateObject("scripting.dictionary")
With Sheets("Appels")
arr = .UsedRange.Value2 'la plage à inspecter (ici toute la feuille) >>> array
For i = 1 To UBound(arr) 'boucle les lignes
dict.Add dict.Count, Range("Myrange")(i, 1).Address & "|" & Join(Application.Index(arr, i, 0), "|") 'ajouter au dictionary : l'addresse de la cellule A & le contenu de toute la ligne
Next
fl = Filter(Application.Index(dict.items, 0, 0), sTexte, 1, vbTextCompare) 'filtre les lignes avec le texte voulu
If UBound(fl) > -1 Then 'il y a des lignes comme-çà
Set UN = .Range("B1") 'une cellulle dehors colonne A
For i = 0 To UBound(fl) 'boucle toutes ces lignes
Set UN = Union(UN, .Range(Split(fl(i), "|")(0))) 'ajouter au place "UN"
Next
Set UN = Intersect(UN, .Columns("A"))
'MsgBox UN.Address & vbLf & .ProtectionMode '& vbLf & .protectcontents
If Not .ProtectionMode And .ProtectContents Then
.Unprotect
.Protect userinterfaceonly:=True
End If
UN.EntireRow.Hidden = False
End If
End With
End Sub