View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pierre Pierre is offline
external usenet poster
 
Posts: 193
Default Use 2nd digit from the left in cell contents for vlookup


Ron Coderre wrote:
Try something like this:

With
A1: (a source string, like 2B75478A3)

This formula looks up the 2nd char from that string in the table at B2:G20
and returns the corresponding value from Col_G

A2: =VLOOKUP(MID(A1,2,1),B2:G20,4,0)

OR...if you want error checking
A2: =IF(COUNTIF(B2:B20,MID(A1,2,1)),VLOOKUP(MID(A1,2,1 ),B2:G20,4,0),"NO
MATCH")

Is that something you can work with?
***********
Regards,
Ron


Ron, that does the trick as well! Thanks much for the error checking
node too.

Pierre