ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   search criteria - auto filter (https://www.excelbanter.com/excel-programming/428082-search-criteria-auto-filter.html)

PAG

search criteria - auto filter
 
Hi,

Is there another VBA way I can use to show more than 2 values to search for
in a column. I would like to seacrh for 3 value in a column and show the
results in the entire row.

Selection.AutoFilter Field:=15, Criteria1:="=*fid*", Operator:=xlOr, _
Criteria2:="=*COLCHESTER*" I wanted to also search for a third
value of Criteria3:="=*TAX-EXEMPT*"

Hope that make sense.

Peter

Dave Peterson

search criteria - auto filter
 
You could learn about advanced filter (using a criteria range).

Or you could use a helper column that has a formula that does that for you.

=or(countif(o2,"*fid*")0,countif(o2,"*colchester* ")0,countif(o2,"*xx*"))

This would return True or false. Then filter by this to show the True's.

PAG wrote:

Hi,

Is there another VBA way I can use to show more than 2 values to search for
in a column. I would like to seacrh for 3 value in a column and show the
results in the entire row.

Selection.AutoFilter Field:=15, Criteria1:="=*fid*", Operator:=xlOr, _
Criteria2:="=*COLCHESTER*" I wanted to also search for a third
value of Criteria3:="=*TAX-EXEMPT*"

Hope that make sense.

Peter


--

Dave Peterson

Dave Peterson

search criteria - auto filter
 
ps.

Debra Dalgleish shares some notes about advanced filtering with a criteria
range:
http://contextures.com/xladvfilter02.html

Dave Peterson wrote:

You could learn about advanced filter (using a criteria range).

Or you could use a helper column that has a formula that does that for you.

=or(countif(o2,"*fid*")0,countif(o2,"*colchester* ")0,countif(o2,"*xx*"))

This would return True or false. Then filter by this to show the True's.

PAG wrote:

Hi,

Is there another VBA way I can use to show more than 2 values to search for
in a column. I would like to seacrh for 3 value in a column and show the
results in the entire row.

Selection.AutoFilter Field:=15, Criteria1:="=*fid*", Operator:=xlOr, _
Criteria2:="=*COLCHESTER*" I wanted to also search for a third
value of Criteria3:="=*TAX-EXEMPT*"

Hope that make sense.

Peter


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com