Sub Filtrage()
Application.ScreenUpdating = False
' Efface tableau
Efface
' Copie tableau Source
Sheets("Source").ListObjects(1).DataBodyRange.Copy Sheets("Recherche").ListObjects(1).ListRows.Add.Range
' Acquisition filtres demandés
Lab = [A2]: SourceI = [I2]
Tmin = [G2]: Tmax = [H2]: Largeur = [D2]: Longueur = [C2]: Volume = [F2]: Hauteur = [E2]
' Mise en place des filtres
If Lab <> "" Then [TabloRecherche].AutoFilter Field:=1, Criteria1:="=" & Lab, Operator:=xlAnd
If Longueur <> "" Then [TabloRecherche].AutoFilter Field:=3, Criteria1:=">=" & Longueur, Operator:=xlAnd
If Largeur <> "" Then [TabloRecherche].AutoFilter Field:=4, Criteria1:=">=" & Largeur, Operator:=xlAnd
If Hauteur <> "" Then [TabloRecherche].AutoFilter Field:=5, Criteria1:=">=" & Hauteur, Operator:=xlAnd
If Volume <> "" Then [TabloRecherche].AutoFilter Field:=6, Criteria1:=">=" & Volume, Operator:=xlAnd
If Tmin <> "" Then [TabloRecherche].AutoFilter Field:=7, Criteria1:="<=" & Tmin, Operator:=xlAnd
If Tmax <> "" Then [TabloRecherche].AutoFilter Field:=8, Criteria1:=">=" & Tmax, Operator:=xlAnd
If SourceI <> "" Then [TabloRecherche].AutoFilter Field:=13, Criteria1:="=" & SourceI, Operator:=xlAnd
End Sub
Sub Efface()
' Supprime tout filtre
With [TabloRecherche].ListObject
If Not .AutoFilter Is Nothing Then .AutoFilter.ShowAllData
End With
' Vide tableau Recherche
On Error Resume Next
[TabloRecherche].ListObject.DataBodyRange.Delete
End Sub