troubleshooting Question

Reverse Excel VLookup with Wildcard?

Avatar of aspdaddy
aspdaddy asked on
VBAMicrosoft OfficeMicrosoft Excel
6 Comments2 Solutions164 ViewsLast Modified:
Hello

Not sure of the terminology but I think what I want to do is reverse the logic of this vlookup , amend the wildcard slightly so that only full word matches are found and I guess to do this it has to be converted to a VBA loop and the search text split into an array.

=IF(LEN(Products[Name] )>2, VLOOKUP("*" & Products[Name] &"*",Orders[Description],1,FALSE),"N/A")

The above works on a list of product names, finding those that appear in order descriptions. What I really need to do is loop over the order descriptions and add the first match of any product name into an adjacent column so that each order description has the product name next to it. Also the above gives a few false positives where the product name is contained in a word. So I need to only match where the product name is immediately preceded and followed by a space or other special character such as hyphen,forward slash, backslash or parenthesis.

Any help appreciated.

Thanks!
ASKER CERTIFIED SOLUTION
Shums
Excel VBA Developer
Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros