Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use "Does Not Contain" in Microsoft Query in Excel 2016

Status
Not open for further replies.

cpjeffm

IS-IT--Management
Mar 9, 2015
73
US
I've got a text field that contains some text that I want to exclude from my query. The text is in the middle of the string and I can't figure out how to use the "Not Like" or "Does Not Contain" in MSQuery to remove them. Here's an example of a string and I need to exclude anything that contains the text "Cash Refund"...

$100.00 Cash Refund on invoice 103510 -
 
[tt]Not Like '*ExcludedText*'[/tt]
It's not case sensitive.

combo
 
Ok I've tried that and couldn't get it to work. I have some other criteria in the query as well so I removed all the other criteria and the Not Like worked as it should. Now I've got to figure out why it won't work with the other criteria.
 
If you show here your criteria, I'm sure somebody will point your problem.
Sometimes there are just "(" and ")" in wrong places, or missing.

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top