lookup formula
Hi, Lookup formula is not working well when we just want to search in an small 2 column table like the image attached it is working wrongly and if we don't attention to it can make big mistakes.
I know we can use vlookup formula in 2column tables but if the table wasn't in 2 column we can't do any thing with lookup and neither Hlookup.
because some of my tables are on 2 rows and I can't use this functions because it will give wrong answers.
1 comment

Roy commented
To use LOOKUP(), your data has to be sorted using the column you use for the lookup. In this case, the data must be sorted by column E.
Given that condition, the function is actually giving correct (though undesired) results.
If you use XLOOKUP(), the problem goes away (assuming your version has it, of course). If you use VLOOKUP() and use "false" as the last (fourth) parameter in it, the problem will go away. That is, use the following formula in K12:
=VLOOKUP(J12,$E5:$F10,2,false)