Thanks for your help zbor and bakerman2!
I forgot to tell this:
The cells I want to use as criteria are in Sheet4, and the table is in Sheet3.
Let me show you all the code:
Sub FilterRange()
Sheets("Sheet3").Select
Range("A1").Select
Range(Selection, Selection.SpecialCells(xlLastCell)).Select
Selection.AutoFilter
Range(Selection, Selection.SpecialCells(xlLastCell)).AutoFilter Field:=3, Criteria1:=Sheets("Sheet5").Range("A4")
Range(Selection, Selection.SpecialCells(xlLastCell)).AutoFilter Field:=4, Criteria1:= _
"~*~*~*~*"
Range(Selection, Selection.SpecialCells(xlLastCell)).AutoFilter Field:=10, Criteria1:=Sheets("Sheet4").Range("C3:K3")
End Sub
I don't know how to mix your code with mine...
Bookmarks