Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

normalize data to scale from 1 to 10

I have a following data set:

A   B   N
1   3   10
2   3   5
3   3   1
3   6   5
10  10  1
20  41  5
20  120 9

I'm looking for an excel function that will normalize A and B to N on scale from 1 to 10.

In above example it would be

1 of 3 is best so N = 10
2 of 3 is in the middle N = 5
3 of 3 is worst N=1
20 of 120 is in second decade N=9

A >= 1 && A <= B

B is natural number

1 <= N <= 10

like image 971
Matjaz Lipus Avatar asked Feb 07 '11 13:02

Matjaz Lipus


1 Answers

Supposing your numbers are in cols A and B. Write at c1:

=MAX(CEILING((B1-A1)/(B1-1)*10,1),1)

And drag to the bottom of column C

like image 137
Dr. belisarius Avatar answered Sep 24 '22 17:09

Dr. belisarius