Filter on likewise string in column (1 Viewer)

suryu

Member
Local time
Today, 12:32
Joined
Apr 3, 2020
Messages
86
I Want to filter column A with name like "ESAF", "E S A F" OR any name like "FBI *"

column contain "ESAF", "E S A F" or ("FBI Bank", "FBI Bank ltd", "FBI Finance ltd" can be more with FBI*)
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 08:02
Joined
Feb 19, 2013
Messages
16,607
presume you mean using excel functionality, not vba. Use the custom filter option

Text Filters>Custom Filter
 

suryu

Member
Local time
Today, 12:32
Joined
Apr 3, 2020
Messages
86
presume you mean using excel functionality, not vba. Use the custom filter option

Text Filters>Custom Filter
using VBA only
 

suryu

Member
Local time
Today, 12:32
Joined
Apr 3, 2020
Messages
86
can anybody help me on this :

I Want to filter column A with name like , "ESAF", "E S A F" OR any name like "FBI *"

i am trying to do below code:

strName="FBI"

Activesheet.Range("$A$1:$CT" & lastRow).Autofilter Field:=1, Criteria1:="=*" & strName & "*", Operator:=xlOr,
Criteria2:="ESAF"

i want to add one more criteria for " E S A F". How to add? anybody suggest me
 

Isaac

Lifelong Learner
Local time
Today, 00:02
Joined
Mar 14, 2017
Messages
8,774
Is this really any different than your last post about this?

You're limited in the # of custom filters that can be added, using VBA or not.

You might need to write some custom code to loop through rows and hide them conditionally.
 

suryu

Member
Local time
Today, 12:32
Joined
Apr 3, 2020
Messages
86
Is this really any different than your last post about this?

You're limited in the # of custom filters that can be added, using VBA or not.

You might need to write some custom code to loop through rows and hide them conditionally.
yes its different, i dont want to hide i just want to filter with given conditions
 

Isaac

Lifelong Learner
Local time
Today, 00:02
Joined
Mar 14, 2017
Messages
8,774
yes its different, i dont want to hide i just want to filter with given conditions
Hmm. Functionally speaking, that's the same. "Filter" means that the rows that don't meet the given conditions will be hidden.
Therefore, if you want to use more filters than are available (2), you'll need to write custom code that hides rows which don't meet the conditions.
 

suryu

Member
Local time
Today, 12:32
Joined
Apr 3, 2020
Messages
86
Hmm. Functionally speaking, that's the same. "Filter" means that the rows that don't meet the given conditions will be hidden.
Therefore, if you want to use more filters than are available (2), you'll need to write custom code that hides rows which don't meet the conditions.
okay fine is there any possibility to add one more criteria in my given code
 

Isaac

Lifelong Learner
Local time
Today, 00:02
Joined
Mar 14, 2017
Messages
8,774
Filters are limited to 2, you will need to write custom code to hide rows that don't match the given criteria.
 

Users who are viewing this thread

Top Bottom