View Single Post
 
Old 03-09-2018, 04:57 AM
LearnerExcel LearnerExcel is offline Windows 7 32bit Office 2013
Advanced Beginner
 
Join Date: Nov 2016
Posts: 82
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default 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.
Reply With Quote