Advanced filter 'Not Like'

tweedle

Well-known Member
Joined
Aug 1, 2010
Messages
1,559
I'm trying to run a manual A/F (no vba)

I have this criteria in the same cell [have gone through multiple iterations].
*DOW* - works, but includes 'windows' which is not desired.
LIKE "*dow*" and NOT LIKE "*windows*" -failed
*DOW* AND "<>*WIN*" - failed

Essentially, I'm trying to grab the records that match the subset LIKE *DOW* and exclude LIKE *windows* -- (I'm reading that now and not even sure it logically makes sense)

The Q: How to syntax the same-cell filter?

Appreciate any guidance.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Have the criteria in different cells in the same row, both with headers for the field.
 
Upvote 0
If the column with the text is A, then you can use this formula for the advanced filter criteria in say, K2 (k1 is blank):
=AND(NOT(ISERROR(FIND("dow",A2))),IF(ISNUMBER(FIND("windows",A2)),FALSE,TRUE))
 
Upvote 0
Bob, Glenn; Thanks for the guidance!
Essentially it's not same-cell at all ... Helper Columns!
Thanks!
 
Upvote 0
I checked out the 'multiple header' idea of glenns, it seems that

Criteria in same column = OR
Criteria in same row = AND

Of course, for the AND condtion, you do need to repeat the headers

I had no idea you could do this.

And as for using a formula for the criteria, I remember coming across this a while ago - looks very powerful but by no means easy.
 
Upvote 0
Bob, Glenn; Thanks for the guidance!
Essentially it's not same-cell at all ... Helper Columns!
Thanks!

Mine is 2 cells of criteria ( plus 2 header cells ).

Bob's is one cell, as you requested ( with a blank header cell ).

No need for helper columns.
 
Upvote 0
No need for helper columns in the data range
A two column Criteria range with '=*DOW* and '<>*WIN* worked for me.
 
Upvote 0
Thanks for all the input; issue resolved.
#1 Learned that the Headerless formula essentially replicates itself across the data range, creating logicals and filters out the FALSE - very cool - got that method to work.
#2 Learned that the multi-column, with headers, criteria should have been prefaced (sp) with the apostrophe. - got that to work as well.

Thanks again!
A pool of genuis this forum is.
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

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