View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Stephen[_2_] Stephen[_2_] is offline
external usenet poster
 
Posts: 364
Default Lookup table between two ranges

"LROCCO" wrote in message
...
Hi,

I would like to lookup a value (entered in cell D1) in the table
below. For example if it were between 0 and 2 it would return R1, if
it were between 3 and 5 it would return R2, etc.

(starting in column A1)
0 2 R1
3 5 R2
6 8 R3

Any help would be gratefully received


You can do this easily with a non-exact vlookup. You don't need the second
column; just enter 0,3,6 in A1:A3 and R1,R2,R3 in B1:B3. Put the value you
want to lookup in D1 and use this formula:
=VLOOKUP(D1,A1:B3,2,1)