VBA Autofilter partial match in column

BenGee

Board Regular
Joined
Mar 5, 2016
Messages
155
Hi

I currently have;
Code:
Sub Button1_Click()
    With ActiveSheet.Range("A8:J61")
        .AutoFilter Field:=2, Criteria1:=ActiveSheet.Range("A5").Value
        .AutoFilter Field:=4, Criteria1:=ActiveSheet.Range("B5").Value
        .AutoFilter Field:=9, Criteria1:=ActiveSheet.Range("C5").Value
End With
End Sub
But what I'm trying to do is something like;
Code:
Sub Button1_Click()
    With ActiveSheet.Range("A8:J61")
        .AutoFilter Field:=2, Criteria1:=ActiveSheet.Range("A5").Value
        .AutoFilter Field:=4, Criteria1:=Text that partially matces ActiveSheet.Range("B5").Value
        .AutoFilter Field:=9, Criteria1:=ActiveSheet.Range("C5").Value
End With
End Sub
Any help would be hugely appreciated!
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
39,074
Office Version
365
Platform
Windows
Try
Code:
.AutoFilter Field:=4, Criteria1:="*" & ActiveSheet.Range("B5").Value & "*"
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
39,074
Office Version
365
Platform
Windows
Glad to help & thanks for the feedback
 

Watch MrExcel Video

Forum statistics

Threads
1,096,324
Messages
5,449,729
Members
405,575
Latest member
Masimo85

This Week's Hot Topics

Top