View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Vlookup Question..if text lookup_value do not match with table

I'm glad to hear that, Lorenzo - thanks for feeding back.

Pete

On Jun 30, 5:15*pm, ldiaz wrote:
Hi Pete.
I got your formula, and it works great!.
Thank you so much for your help on this issue.

Have a nice day.

--
Lorenzo Díaz
Cad Technician



"Pete_UK" wrote:
Yes, I said I'd get back to you. Spain beat Germany 1-0, so I wasn't
really rooting for either side.


Try something like this in B2:


=IF(ISNA(VLOOKUP(LEFT(A2,LEN(A2)-2)&"xx",Sheet2!A:B,2,0)),
IF(ISNA(VLOOKUP(LEFT(A2,LEN(A2)-7)&"xx-"&RIGHT(A2,4),Sheet2!A:B,
2,0)),"not present",
VLOOKUP(LEFT(A2,LEN(A2)-7)&"xx-"&RIGHT(A2,4),Sheet2!A:B,2,0)),
VLOOKUP(LEFT(A2,LEN(A2)-2)&"xx",Sheet2!A:B,2,0))


This is all one formula - be wary of spurious line-breaks when it
appears in your newsgroup Reader.


Hope this helps.