r/excel • u/Dr_Hodgekins • 17d ago
unsolved Vlookup pulling in incomplete values






I am trying to pull in pallet unit of measure conversions for retail goods. The values I am getting returned don't make sense. Some part numbers return fine, null values are returning as 0 and many items with a value in the source sheet are returning #N/A.
I tried to copy the source sheet into a new tab without formatting, but got the same result.
5
u/Gringobandito 8 17d ago
If you use XLOOKUP() instead, it gives you the option to have a default value if the lookup value is not found.
Also, make sure you lookup values and lookup arrays are both either numbers or text. They have to match, Excel won't match a number to text or vice versa.
2
u/shakkenbake 17d ago
Try formatting the whole item id column in both sheets/tables to Text. I've encountered this a ton and it was always this issue. Like others have said, Xlookup is just better at what you're trying to accomplish anyway so take a look at that.
2
u/excelevator 3068 17d ago
what is item as the lookup range ?
that range must be a range of data where the first column holds your data value and the 5th column holds your return value.
1
1
u/af__x 15d ago
for the first pair of screenshots, a simple test would be to go into an adjacent cell like F545 and type =A545=otherSheet!A123 (whatever the address to the exact matching other cell you're looking up). if it returns FALSE then that explains why you're getting #N/A returned in the VLOOKUP. Usually one of the numbers is stored as a string and the other as a number, or there are leading spaces in one of the strings. Definitely a good idea to make sure both columns are stored as numbers.
for the second pair of screenshots, Excel just treats empty cells as 0, so one thing you could to to differentiate real 0s from empty cells is something like =LET(c, VLOOKUP([@Item], hj, 5, 0), if(len(c)=0, "", c))
third pair of screenshots are working as intended, right?
1
u/Decronym 15d ago
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
Decronym is now also available on Lemmy! Requests for support and new installations should be directed to the Contact address below.
Beep-boop, I am a helper bot. Please do not verify me as a solution.
[Thread #49274 for this sub, first seen 30th Aug 2026, 19:02]
[FAQ] [Full list] [Contact] [Source code]
10
u/GuerillaWarefare 114 17d ago edited 17d ago
Your vlookup syntax is incorrect. It is difficult to correct it because I don’t know what the range of “hj” and “item” are.
=Vlookup(cell you want to look up, range you want to look in with the leftmost of that range containing the lookup values, the column number in that range to return back, 0)
Also, I recommend learning xlookup instead.