I am using Office Excel 2007 and am trying to make a spreadsheet where a the rows will sort themselves numerically (specifically largest to smallest) each time I close the document and re-open it. I want them to sort based on one column and have the "leader" (with the highest score) to move to the top each time followed by the rest of the group's scores listed numerically.|||There are two ways to that. One is via macro and the other is using the rank() function.
I will try to show you how to use the rank() function way, ok ?
First, you must create an additional column with the following formula
=rank( element , range of values)
Supose that you have the scores in the range from b1:b100 ... In collumn c put the formula
=rank( b1 , $b$1:$b$100) and copy it form c1 to c100
Now you'll have a column with the rank (position) of the number among the entire set of numbers.
The next step is to put the names in rank.
Supose the names are in column A, so in column D put the following formula
=index( $a$1:$a$100 , match( row() , $c$1:$c$100, 0 ) , 1 )
Copy this formula from d1 to D2:D100
There you have it. You may need to adapt the formulas to your spreadsheet.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment