Hi,
Can anyone help me, I did try this code but when it go to the 2nd filter, it seems does not select anything.
Please Login or Register to view this content.
Hi,
Can anyone help me, I did try this code but when it go to the 2nd filter, it seems does not select anything.
Please Login or Register to view this content.
* may only take two values at most with filter.
Hi, Faridwahidi,
please do not start multiple posts on the same subject [http://www.excelforum.com/excel-prog...haracter.html] but stay in the original thread or at least post a link to the other thread.
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Hi AB33,
How to make it more than 2 criteria, I really need to use that method. Please help me.
Did you try it this way?
Please Login or Register to view this content.
Last edited by xladept; 07-20-2014 at 12:04 AM.
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
HI Xladept,
I have tried, but there is only ("Head, Bi*") selected while the 1st & 2nd character ("BC, HEA*", "Deputy Hea*") not selected.
I do not expect that filter would be a bit difficult task. If there is no star "*" sign, it works fine. we can use record macro code
This code working fine
Please Login or Register to view this content.
but will NOT working for filtering more than 2 items with star "*" sign
Please Login or Register to view this content.
Last edited by Faridwahidi; 07-18-2014 at 07:15 PM.
If you can post a sample workbook, I'll take a look at it tomorrow.
Hi xladept,
Attached herewith the with sample of workbooks.
I have tried this code but only one item selected instead of 3.
If I include Operator:=xlFilterValues, there is no item selected.
Please Login or Register to view this content.
Hi Farid.
I think I'm confused - when it filters the first criterion of the array, why would there be other criterion to filter on??
Hi Xladept,
I want to filter Business Banking (1st Filter)
then, within Business Banking, I want to select these criteria
"BC, Head"
"Deputy Head"
"Head Biz Dev"
I have decided to put star sign "*" in order to avoid missing items if the user add another words on that criteria. e.g. "BC, Head (Relief)"
I really do not expect that filter would be a bit difficult to VBA beginner.
I can use the recording macro code and add as much as criteria if there is no star "*" sign.
Hi Farid,
I couldn't see anything wrong with your code, but here's a workaround:
Please Login or Register to view this content.
Hi Xladept,
Thanks a lot. ,
What does it means by j = 13
Hi Farid,
Thanks for the rep!
j is the index for the For...Next Loop - the values start at 13 (the first data row) and go all the way to i
BTW: If you want to recover between runs I should have added the code in red:
Please Login or Register to view this content.
You can't use wildcards with an array filter, if you have more than two values in the array, which was the original problem.
Last edited by romperstomper; 07-21-2014 at 09:34 AM. Reason: Expansion
Remember what the dormouse said
Feed your head
Hi romperstomper,
This method works for me. Without the alternative method, can it be solved using standard filter?
You'd have to loop and create an array of the actual values you are interested in, or use an advanced filter instead.
Hi Rory,
Is it that:is poorly coded??Please Login or Register to view this content.
Hi XLAdept,
As I indicated in my post #2, the wild card will not work with more 1 or 2(Can not remember exactly) criteria with filter, it acts like OR and AND in filter
I guess that depends on your perspective.
It's expecting exact values but it is willing to accept two 'contains' criteria, just as you could do through the UI.
Hi,
Can anyone of you show example of advanced filter?
Hi,
Can anyone of you show example of advanced filter?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks