Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default A lookup based on conditions

Hi Everyone,

I am curious if anyone knows a way to be able to look up a value based
on whether or not a 'source' value falls in a range of possible
values?

In Short, if I have an ipnut (source) value of 100, I want to be able
to do some form of lookup on a list, and return a result. The list may
have a range of values such as 85-100, and a return value of 'apples'.
If the input is 100, it is in the range of 85 to 110, and the value in
the column next to the 85-100 range is 'apples'. If the input was 120
then the lookup would have to figure out which range of numbers the
value falls into and then return the column next to that.

I thought that it might be possible to have a column with the maximum
number for a given range of values (in the example above it might be
110), then somehow compare the input value to see if it was less than
the max value.

Due to the number of possible sets of values that the input could
possibly take there is no way to use a simple IF statement as you can
only nest them so (7??) deep. I would love to be able to do this from
a dynamic named range if possible.

Anyone got any ideas?

Cheers

The Frog
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default A lookup based on conditions

It's possible, if the list is sorted in ascending order like

20
45
85
111


VLOOKUP(lookup_value,Table,2)

so if the lookup value is 100 it will return what's next to 85 and if it is
112 it will return what's next to 111


--


Regards,


Peo Sjoblom



wrote in message
...
Hi Everyone,

I am curious if anyone knows a way to be able to look up a value based
on whether or not a 'source' value falls in a range of possible
values?

In Short, if I have an ipnut (source) value of 100, I want to be able
to do some form of lookup on a list, and return a result. The list may
have a range of values such as 85-100, and a return value of 'apples'.
If the input is 100, it is in the range of 85 to 110, and the value in
the column next to the 85-100 range is 'apples'. If the input was 120
then the lookup would have to figure out which range of numbers the
value falls into and then return the column next to that.

I thought that it might be possible to have a column with the maximum
number for a given range of values (in the example above it might be
110), then somehow compare the input value to see if it was less than
the max value.

Due to the number of possible sets of values that the input could
possibly take there is no way to use a simple IF statement as you can
only nest them so (7??) deep. I would love to be able to do this from
a dynamic named range if possible.

Anyone got any ideas?

Cheers

The Frog



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
Lookup in Table based on Two Conditions dme82 Excel Discussion (Misc queries) 2 January 11th 08 07:56 PM
shade cells based on conditions - i have more than 3 conditions Mo2 Excel Worksheet Functions 3 March 30th 07 07:19 AM
Lookup Data based on 2 or more conditions/arguments TravisB Excel Discussion (Misc queries) 3 March 4th 07 10:24 PM
Counting based upon 2 conditions that are text based walkerdayle Excel Discussion (Misc queries) 7 August 22nd 06 01:29 AM
Lookup based on two conditions [email protected] Excel Worksheet Functions 6 May 17th 06 10:51 PM


All times are GMT +1. The time now is 04:45 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"