If 2 columns text matches, then result with 3rd columns data

Copper Contributor

Hello! 

I am using ODBC to pull data from our inventory system but it does not give me the full information I need. We have a 2 digit make code that I would like the full name spelled out in the next column. I have the 2 digit code and full names on another tab of my work book. How do I get the results to match up where I need it? 

 

 

4 Replies

@HBSnyd11 

Let's say the other sheet is named List, with 2 digit codes in A2:A100 and names in B2:B100.

On the sheet with inventory data, the 2 digit codes are in D2 and down.

In another cell in row 2:

=VLOOKUP(D2, List!$A$2:$B$100, 2, FALSE)

or

=XLOOKUP(D2, List!$A$2:$A$100, List!$B$2:$B$100)

Fill down.

@Hans Vogelaar 

 

Unfortunately, neither gives me any results. Does it matter that my data is in tables? 

@HBSnyd11 

Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Alternatively, you can attach it to a private message to me.

@HBSnyd11 

I have received your workbook. The TB_KEY column on the PFWTAB sheet contains extra spaces after the two-letter code, and so does the TB_DATA column. The following formula works:

=TRIM(VLOOKUP(H3&"*", PFWTAB[[TB_KEY]:[TB_DATA]], 3, FALSE))

See the workbook in your private messages.