View Single Post
 
Old 10-06-2017, 03:45 PM
LearnerExcel LearnerExcel is offline Windows 7 32bit Office 2003
Advanced Beginner
 
Join Date: Nov 2016
Posts: 82
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default How to use wild card in VBA for Advance Filter?

I have the following VBA Code which filters data but if I type starting text in excel search field. It doesn't filter date if it is from the middle of the cell.

For Example, Cell B7 Contains text "Starting Data File & Middle File" and when I type in Cell B2 (Search Criteria Cell) "Starting" it shows the result. But if I type "Middle File" it won't show any records. How can I resolve this issue? How to use the wildcard here in VBA?

Code:
Sub SearchMe()
' SearchMe Macro
    Range("B5:J1000").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
        Range("ComparisonFilterInPlace!B2:J3"), Unique:=False
End Sub
Reply With Quote