View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default VLookup is not working correctly

Just to add...

My favorite!

=VLOOKUP(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"~"," ~~"),"?","~?"),"*","~*"),
Sheet2!$A:$B,2,FALSE)

To handle both the * and ? wildcard and the ~ "escape" character.

Eric @ BP-EVV wrote:

I am looking up an on-hand quantity from one table to populate another table
based on an item number. I have a couple of scenarios where VLookup is
bringing back the same value for both items, but when I look them up
manually, I find that the two items have a different on-hand value. For item
number UX2022U and UX2022U* I get the same on-hand returned....smae thing
goes for item numbers UX2022R and UX2022R*. The vlookup I am using is this:

=VLOOKUP(A828,'[ilicst 16-jul-08.xls]Sheet1'!$A$2:$I$10189,8,FALSE)

Doesn't the "FALSE" in the expression tell Excel to find an EXACT match ? I
think the '*' in the last position of my item number is causing Excel to
treat that like a wildcard and not find the EXACT match.

Any ideas on how to work around this ?

Thanks !


--

Dave Peterson