lookup a value in a table

G

Guest

I need to lookup a value in a table, using the first 2 columns as a range,
then return the approp value from the 3rd column. For example lookup 8, as it
falls between 7 and 9, I want to return e. 18 would give me m as would 25.
col1 col2 col3
1 6 q
7 9 e
11 25 m
 
G

Guest

Assuming the source lookup table is in A1:C3,
lookup value (eg: 8) in E1

Place in F1, array-enter (press Ctrl+Shift+Enter to confirm the formula):
=INDEX(C1:C3,MATCH(1,(E1>=A1:A3)*(E1<=B1:B3),0))
 
P

PCLIVE

One way:

=INDIRECT("C" & SUMPRODUCT(--(A1:A3<=D1),--(B1:B3>=D1),ROW(C1:C3)))

D1 contains the value to look up. Change as needed.

HTH,
Paul
 
G

Guest

Thanx

Max said:
Assuming the source lookup table is in A1:C3,
lookup value (eg: 8) in E1

Place in F1, array-enter (press Ctrl+Shift+Enter to confirm the formula):
=INDEX(C1:C3,MATCH(1,(E1>=A1:A3)*(E1<=B1:B3),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