Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Excel or Access(preferably) I want to do the following: I have company names matched with their zip codes like:

Ozer LTD-55200
Gelibolu INC.-34759

and also I have some strings like ze and ibolu which are substrings of the company names and I have a list of zipcodes. I want to extract from the companyname-zipcode list the companies that contain ze and ends with 55200 zipcode or another example: company name contains ibolu and ends with 34759 zipcode.

In short I need a function like: Matching strings that includes "xyz" and ends with "01234"

share|improve this question

you can use a query that has the criteria LIKE "*ze*" AND LIKE "*55200"

the first like has * at both ends of the comparison string to match anywhere
the second like only has a * at the beginning, so the matching string has to appear at the end

share|improve this answer
thank you for your answer but I need a generic formula for that since I have 1000 unique rows in total – Timothy Jul 23 '12 at 8:10
to make the query generic, use LIKE "*" & [field1] & "*" AND LIKE "*" & [field2] – SeanC Jul 23 '12 at 13:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.