Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Lookup table between two ranges

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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)


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Lookup table between two ranges

On 5 Dec, 13:05, "Stephen" <none wrote:
"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)


Thanks for that, works great.

I guess it would be more difficult if the numbers didn't follow on
from each other, i.e.

2 4 R1
7 10 R2
12 17 R3




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 364
Default Lookup table between two ranges

"LROCCO" wrote in message
...
On 5 Dec, 13:05, "Stephen" <none wrote:
"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)


Thanks for that, works great.

I guess it would be more difficult if the numbers didn't follow on
from each other, i.e.

2 4 R1
7 10 R2
12 17 R3


Well, what would you want to be returned for 5, etc.? You could make the
lookup table like this, for example:
2 R1
5 "invalid"
7 R2
11 "invalid"
12 R3
18 "invalid"


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Lookup table between two ranges

On 5 Dec, 14:09, "Stephen" <none wrote:
"LROCCO" wrote in message

...





On 5 Dec, 13:05, "Stephen" <none wrote:
"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)


Thanks for that, works great.


I guess it would be more difficult if the numbers didn't follow on
from each other, i.e.


2 4 R1
7 10 R2
12 17 R3


Well, what would you want to be returned for 5, etc.? You could make the
lookup table like this, for example:
2 R1
5 "invalid"
7 R2
11 "invalid"
12 R3
18 "invalid"- Hide quoted text -

- Show quoted text -


Yes of course, makes sense, nice one
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Name ranges and Lookup eionjess Excel Worksheet Functions 3 January 26th 07 02:45 AM
Lookup Value between 2 ranges Dominique Feteau Excel Worksheet Functions 2 November 1st 05 06:17 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM
vlookup using two table ranges mlou Excel Worksheet Functions 1 May 18th 05 08:43 PM
Ranges with in a LOOKUP Elijah Excel Worksheet Functions 2 November 23rd 04 10:40 AM


All times are GMT +1. The time now is 03:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"