hi,
i am trying to modify the following code to let me filter the list in sheet2 with contain not as the whole value in the cell
for example if the cell A2 = a and Cell A3 = aa...when i filter "*a*" will be both as a result.
Option Explicit
Sub Filter_Using_Criteria_List()
'''''Variables Declacaration
Dim Criteria_Val(100) As String
Dim iRow As Integer
'''''Loop Thru the List and Create Criteria List in String Array
iRow = 0
While Sheets(2).Cells(iRow + 1, 1) <> ""
Criteria_Val(iRow) = Sheets(2).Cells(iRow + 1, 1)
iRow = iRow + 1
Wend
'''''Criteria List is Created. Pass it as parameter to Filter
Sheets(1).Range("A1:A20").AutoFilter Field:=1, Criteria1:=Criteria_Val, Operator:=xlFilterValues _
, Operator:=xlOr
End Sub
thanks.
Bookmarks