Like filter: Please advice

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Can we filter with like values? I just donno what to do:confused:
Please advice:
Code:
[/FONT]
[FONT=Courier New]Range("B1:E12").AutoFilter
ActiveSheet.Range("$B$1:$E$12").AutoFilter Field:=1, Criteria1:=Array( _
        "Userid" & "*", "Name" & "*", "KX1"), Operator:=xlFilterValues
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi Pedie

Not sure I follow, maybe this.
Excel Workbook
BCDEFG
1test1test2test3test4Bob
2Bob wData1Data1Data1
3v BobData2Data2Data2
4BobsData3Data3Data3
5TedData4Data4Data4
6JimData5Data5Data5
7BobbData6Data6Data6
8Bob88Data7Data7Data7
97BobData8Data8Data8
Sheet1
Excel 2010<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> test()<br>  Range("B1:E1").AutoFilter<br>  ActiveSheet.Range("$B$1:$E$12").AutoFilter Field:=1, _<br>    Criteria1:="*" & Range("G1") & "*", Operator:=xlFilterValues<br><SPAN style="color:#00007F">End</SPAN><SPAN style="color:#00007F">Sub</SPAN><br><br></FONT>
 
Upvote 0
Brian, thanks alot! it works...but can i add one more like critiria like the one you have...
like *bob*
then maybe like *Ped*
:)
Thanks again
 
Upvote 0
Ok try,
Excel Workbook
BCDEFG
1test1test2test3test4Bob
2Bob wData1Data1Data1Ped
3v BobData2Data2Data2
4BobsData3Data3Data3
5TedData4Data4Data4
6JimData5Data5Data5
7BobbData6Data6Data6
8Bob88Data7Data7Data7
97BobData8Data8Data8
10PedData8Data8Data8
11t PedData8Data8Data8
12Ped ~Data8Data8Data8
Sheet1
Excel 2010<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> test()<br>  Range("B1:E1").AutoFilter<br>  ActiveSheet.Range("$B$1:$E$12").AutoFilter Field:=1, _<br>    Criteria1:="*" & Range("G1") & "*", Operator:=xlOr, Criteria2:="*" & Range("G2") & "*"<br><SPAN style="color:#00007F">End</SPAN><SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,548
Members
452,927
Latest member
rows and columns

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top