Private Sub Worksheet_Activate()
Worksheet_Change [A1] 'lance la macro
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cible$, ncol%, tablo, i&, j%, n&, k%
If [A1] <> "" Then cible = "*" & UCase([A1]) & "*"
ncol = 6 'à adapter
tablo = Sheets("BDD").[A1].CurrentRegion.Resize(, ncol) 'matrice, plus rapide
ReDim resu(1 To UBound(tablo), 1 To ncol)
For i = 2 To UBound(tablo)
For j = 1 To ncol
If UCase(tablo(i, j)) Like cible Then
n = n + 1
For k = 1 To ncol: resu(n, k) = tablo(i, k): Next k
Exit For
End If
Next j, i
'---restitution---
Application.EnableEvents = False 'désactive les évènements
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [A3] '1ère cellule des résultats, à adapter
If n Then .Resize(n, ncol) = resu
.Offset(n).Resize(Rows.Count - n - .Row + 1, ncol).ClearContents 'RAZ en dessous
End With
Columns(2).Resize(, Columns.Count - 1).AutoFit 'ajuste les largeurs
With UsedRange: End With 'actualise la barre de défilement verticale
Application.EnableEvents = True 'réactive les évènements
End Sub