Forum Discussion
Why is XLOOKUP not returning the value on one sheet but does on another?
- Jun 11, 2024
NotSoFastEddie This is simply caused by the lookup_value and the lookup_array being different data types. All of the SKU and Fineline Codes on the baseData worksheet are numbers formatted as text, while the Fineline-HeliumSKU worksheet contains actual numeric values. There are many ways to remedy this, but one example would be to change the finelineCode definition in your LET statement from INDEX(data_tbl,,2) to --INDEX(data_tbl,,2). The double-negative sign will force the numbers format as text to become numeric values.
NotSoFastEddie This is simply caused by the lookup_value and the lookup_array being different data types. All of the SKU and Fineline Codes on the baseData worksheet are numbers formatted as text, while the Fineline-HeliumSKU worksheet contains actual numeric values. There are many ways to remedy this, but one example would be to change the finelineCode definition in your LET statement from INDEX(data_tbl,,2) to --INDEX(data_tbl,,2). The double-negative sign will force the numbers format as text to become numeric values.
djclements Thanks again DJ. I did look at the data and I saw it defined as General. I guess I didn't look far enough.