vlookup & wildcards

A

Alex

The following are columns in worksheetA:

TrkCase Order
iou9876y7
p0987ewuu


The following are column in worksheetB:

CaseNo Order
987 Apples
7ewuu Pears


In Worksheet A I need a formula (Orders column) that will look to see if any
CaseNo in WorksheetB matches the TrkCase in worksheetA and if it does, put
the cooresponding Order number from worksheetB in the Orders column in
worksheetA.

I'm using VLookup(A2,worksheetBA2:B2,2,False), which works fine if I don't
use wildcards, but how can I look for CaseNo anywhere inside TrkCase? Seems
like I should be using wildcards, but was having no luck. Thanks for your
help.
 
P

Peo Sjoblom

Yes you can use wildcard in a vlookup, but does it really matters, it will
only pick up the first occurrence of a match


=VLOOKUP("*"&D1&"*",Table,2,0)

use wildcards as an example


Regards,

Peo Sjoblom
 
P

Peo Sjoblom

I might add that autofilter would probably be a good fit for something like
this


Regards,

Peo Sjoblom
 
A

Alex

This isn't working, because I think the wildcards really needs to be around
the Table (somehow). I'm really looking up to see if part of TrkCase is any
field in CaseNo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top