Sub Filtre_job75()
Dim t, criteres, ub&, tablo, ncol%, n&, i&, j%, k&, col%
t = Timer
criteres = [liste].Resize(Application.CountA([liste]), 2) 'matrice, plus rapide, au moins 2 éléments
ub = UBound(criteres)
tablo = Sheets("BD").[A1].CurrentRegion
ncol = UBound(tablo, 2)
n = 1
For i = 2 To UBound(tablo)
For j = 3 To ncol
For k = 1 To ub
If InStr(tablo(i, j), criteres(k, 1)) Then
n = n + 1
For col = 1 To ncol: tablo(n, col) = tablo(i, col): Next col 'copie la ligne
GoTo 1
End If
Next k, j
1 Next i
'---restitution---
With Sheets("Résultat").[A1]
.Resize(n, ncol) = tablo
.Offset(n).Resize(Rows.Count - n - .Row + 1, ncol).ClearContents 'RAZ en dessous
End With
MsgBox "Durée " & Format(Timer - t, "0.00 \s"), , "job75"
End Sub