Lookup Function Referencing cells, not text values

J

Justin

I want to use the Lookup function to reference cell values, not just
hand-entered values.

For example:
Column A Column B
1 23
2 45
3 65
4 78
5 93

I then want to enter a value into cell A9 and have a lookup function in cell
B9 that looks like this:
=LOOKUP(A9,{A1,A2,A3,A4,A5},{B1,B2,B3,B4,B5})

The lookup function works by entering in the corresponding values by hand
into the cell:
=LOOKUP(A9,{1,2,3,4,5},{23,45,65,78,93})

But that's not what I need! I appreciate any help.
 
J

Justin

That did not work. Is the "2" in the formula referencing the second column of
values?
 
D

daddylonglegs

You can use simply

=LOOKUP(A9,A1:B5)

but it depends on the data and the results you require. This requires A1:A5
to be sorted ascending and will give a result where there is not an exact
match, so, given your example if A9 contains 2.5 the above will return 45
 

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

Similar Threads


Top