Hellloooo Friends.. Can someone help me debug my Advanced filter.
My end goal is to hide all rows that do no have "ABCD-201,ABCD-202,ABDC-203" in column A.
My end goal is to hide all rows that do no have "ABCD-201,ABCD-202,ABDC-203" in column A.
Code:
'Start my filters
'creating a Advanced filter to find ABCD
With Sheets(2)
.Range("AR1").NumberFormat = "General"
'Insert values of interest in cells AP1
.Range("AP1").Value = "ABCD"
'Create named range MyList
.Names.Add Name:="MyList", RefersTo:="='SO'!$AP$1"
'Put a header in AQ1
.Range("AQ1").Value = "MyList"
'Create the criteria range in range AR1 using a formula
.Range("AR1").Formula = "=NOT(OR(INDEX(ISNUMBER(SEARCH(MyList,A2)),0)))"
'Apply advanced filter in data range
.Range("$A$1:$A$" & .Cells(.Rows.count, "A").End(xlUp).Row). _
AdvancedFilter Action:=xlFilterInPlace, criteriarange:=.Range("AR1"), _
Unique:=False
End With