I have been trying to use multiple filters on an specific column.
When I have been trying to using on 1 or 2 conditions it works fine but when the number of filters exceeds it doesn't gives the proper result.
For Eg Input Data
SNo. UserID
1 12NC00812
2 25NC00215
3 11BN00880
4 15AC00225
5 19NK00815
6 25NK00213
7 11DS00215
8 11AK00220
9 12AK00120
I am using the Formula
Set wrkbokUser= Workbooks.Open(strUser)
Set shtTemp = wrkbokUser.Sheets(1)
lngLastrow = shtTemp .Cells(Rows.Count, 1).End(xlUp).Row
shtTemp .Range("$A$1:$H$" & lngLastrow).AutoFilter field:=2, Criteria1:=Array("*NC00*", "*NK00*", "*AK00*", "*AC00*"), Operator:=xlFilterValues
TempLastrow = shtTemp .Cells(Rows.Count, 1).End(xlUp).Row
If TempLastrow > 1 Then
#Logic to be performed
End If
shtTemp.AutoFilterMode = False
Expected Output:
SNo. UserID
1 12NC00812
2 25NC00215
4 15AC00225
5 19NK00815
6 25NK00213
8 11AK00220
9 12AK00120
Please Suggest how it can be done.