help with lookup please

W

westie13

hi guys, im sure this is a easy one
im using a lookup function. what i want to do is use and a cross
reference.
1a a 2 b
2 b
3a c
4 d
5a e
above is what im talking about. formular is =LOOKUP(D1,A1:A5,B1:B5)
and that works fine except if the figure i put in D1 isnt exactly the
same as in in A1:A5 ie type 3 instead of 3a the result will be the
previous line (b)
is there a way of doing a exact lookup or some way to return a false or
error if it cant find an exact result.

i hope that makes sence

Scott
 
G

Guest

.. =LOOKUP(D1,A1:A5,B1:B5)

Try VLOOKUP with the 4th param set to zero (or FALSE) for an exact match:
=IF(D1="","",VLOOKUP(D1,{"1a","a";2,"b";"3a","c";4,"d";"5a","e"},2,0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top