Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Return value from list based on criteria

I have two numbers - X and Y.

I want to get value from a sorted list, based on how close Y is to X.
Values in the list are let's say from 1 to 5.

The values X and Y are between same min/max ranges.

Example:
X=5
List values: 1,2,3,4,5
Min is 0
Max is 100


If Y=50 the returned value should be 5
If Y=25 or 75, the returned value should be 3
If Y=10 or 90, the returned value should be 1
and so on.

any ideas how to emplement?

thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Return value from list based on criteria

I am not really sure what you want to do
I assume you meant X = 50 in your example
Do you want integer values?
Where are the break points? (When does it change from 5 to 4, from 4 to 3,
etc)
What happens if X is not in the center of your range?
one method could be something similar to

=floor(4*if(yx,(Max-y)/(Max-x),(y-Min)/(x-Min)),1)+1

" wrote:

I have two numbers - X and Y.

I want to get value from a sorted list, based on how close Y is to X.
Values in the list are let's say from 1 to 5.

The values X and Y are between same min/max ranges.

Example:
X=5
List values: 1,2,3,4,5
Min is 0
Max is 100


If Y=50 the returned value should be 5
If Y=25 or 75, the returned value should be 3
If Y=10 or 90, the returned value should be 1
and so on.

any ideas how to emplement?

thanks in advance


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Return value from list based on criteria

yep x=50
double values needed
break points - distributed even from max to avergare and from mni to
average, where the max distibution point is at average



bj wrote:
I am not really sure what you want to do
I assume you meant X = 50 in your example
Do you want integer values?
Where are the break points? (When does it change from 5 to 4, from 4 to 3,
etc)
What happens if X is not in the center of your range?
one method could be something similar to

=floor(4*if(yx,(Max-y)/(Max-x),(y-Min)/(x-Min)),1)+1

" wrote:

I have two numbers - X and Y.

I want to get value from a sorted list, based on how close Y is to X.
Values in the list are let's say from 1 to 5.

The values X and Y are between same min/max ranges.

Example:
X=5
List values: 1,2,3,4,5
Min is 0
Max is 100


If Y=50 the returned value should be 5
If Y=25 or 75, the returned value should be 3
If Y=10 or 90, the returned value should be 1
and so on.

any ideas how to emplement?

thanks in advance



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
Retrieving value from list based on dynamic condition rz6657 Excel Discussion (Misc queries) 3 August 19th 06 01:10 PM
Filter the results of a list based on a previous vlookup against the same list Mizpah Excel Worksheet Functions 2 August 18th 06 10:28 AM
Return a price based on a customer from a drop down list Pete Elbert Excel Discussion (Misc queries) 7 May 1st 06 02:54 AM
return a list goodmike Excel Worksheet Functions 1 January 28th 06 11:17 PM
Using advanced filter to search for criteria in a list Potatosalad2 Excel Discussion (Misc queries) 1 June 8th 05 03:08 AM


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