Forum Discussion
MrZiKE
Feb 17, 2022Copper Contributor
LOOKUP function help
Hi, I have a problem with LOOKUP (WYSZUKAJ in Polish version). I have a long list of part names with manufacturer name, category, subcategory, addidtional parameter and set of prices in every line. O...
- Feb 17, 2022
There are like 4 different 'lookup' version and all except the newest XLOOKUP default to expecting the array to be in ascending order. Either use XLOOKUP if you have it, or use VLOOKUP and define the range_lookup to be 'False' to only find an exact match, or use INDEX(... MATCH(.... , 0) ) and note the MATCH must have that last parameter set to find a exact match also.
Patrick2788
Feb 17, 2022Silver Contributor
The issue is the words are not sorted in ascending order so the LOOKUP fails.
From Microsoft:
Important: The values in array must be placed in ascending order: ..., -2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP might not return the correct value. Uppercase and lowercase text are equivalent.
A better option is to use VLOOKUP or XLOOKUP (If available).