Forum Discussion
HBSnyd11
Feb 28, 2023Copper Contributor
If 2 columns text matches, then result with 3rd columns data
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?
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.
- HBSnyd11Copper Contributor
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.