please help with this formula, =IF(Sheet2!B$2:B$20,"="&A18,LOOKUP(2,1/(Sheet2!D2:D20<>""),Sheet2!D2:D20))

based upon an entry into A18 it should search Sheet2 and give the last result entered that matches A18 entry. it gives the correct result but not based upon what is in A18.

Thanks in advance if anyone can help