View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mark Mark is offline
external usenet poster
 
Posts: 989
Default vlookup retunrning a match, when not a match...

The purpose of my quest is this... I have two lists of item numbers, most of
which are the same. But, I need to add any item numbers that are in the
second list, but not the first, to the first, to get a unique list from the
entire set.

I've thought of a way to handle this. The problem, as is, is that:

a*b*c

is finding the match:

a*BB*c

when I don't want that to be a match.

I think it's using a regular expression logic to find a pattern match...
read it as anthing b anything, and that matches anything BB anything.

But, the lengths are different. If I put in a check to see that the length
on the item found in the list, is the same as the length of the item searched
for, it will eliminate my problem.

but I still wish it was at least an option as to whether you want it to do
wild card searches or not.

I've further proved the problem by replacing the contents of cell A3 with
the word:

Northeast

and cell B1 with:

*east

The formula in cell C1, =VLOOKUP(B1,tblList,1,FALSE) returns a match:

Northeast

That could be very useful IF that's what I wanted it to do.

As is, it's mildly annoying.