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 |
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 |
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 |
All times are GMT +1. The time now is 05:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com