How to Auto Filter data based on Cell E1 text as Criteria?
How to Auto Filter data based on Cell E1 text as Criteria?
Sub FilterData()
With Sheet1
.AutoFilterMode = False
.Range("B8:O8").AutoFilter
.Range("B8:O8").AutoFilter Field:=6, Criteria1:="Books"
End With
End Sub
This code is retrieving data that contain the text "Books" in Column 6.
|