Sub Cherche_Copie_Ligne()
Dim strSearch$, colsearch%, ncol%, tablo, n&, i&, j%
strSearch = LCase(Application.InputBox("Nom de l'adhérent"))
If strSearch = "" Then Exit Sub
With Sheets("Recap").[A1].CurrentRegion 'à adapter
colsearch = 3 'colonne de recherche, à adapter
ncol = .Columns.Count
If ncol < colsearch Then ncol = colsearch
If ncol = 1 Then ncol = 2
tablo = .Resize(, ncol) 'matrice, plus rapide
End With
n = 1
For i = 2 To UBound(tablo)
If InStr(LCase(tablo(i, colsearch)), strSearch) Then
n = n + 1
For j = 1 To ncol
tablo(n, j) = tablo(i, j)
Next
End If
Next
'---restitution---
Application.ScreenUpdating = False
With Sheets("Relai")
If .FilterMode Then .ShowAllData 'si la feulle est filtrée
.[A1].CurrentRegion.ClearContents 'RAZ
.[A1].Resize(n, ncol) = tablo
.Columns(1).Resize(, ncol).AutoFit 'ajustement largeur
With .UsedRange: End With 'actualise les barres de défilement
.Activate 'facultatif
End With
End Sub