Feb 28 2023 02:08 PM
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?
Feb 28 2023 02:58 PM
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.
Mar 01 2023 12:37 PM
Unfortunately, neither gives me any results. Does it matter that my data is in tables?
Mar 01 2023 12:41 PM
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.
Mar 01 2023 01:52 PM
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.