Reputation: 219
In Excel, how do I sort the values (the values are in a row instead of column) in descending order and then write down the order in the following columns? For examples, I have four values (22,45,6,9) and after sorting them in descending order, put the order number in the following cells, value "22" is in order 2nd,so number "2" is written first, number "1" is the next to indicate value "45" is in the first order and so on...
Values Order
22 45 6 9 2 1 4 3
Thank you
Upvotes: 0
Views: 894
Reputation: 3833
Assuming your values are in row 1, and you want the order-place of each of those values in row 2, and you want the sorted values in row 3 [I'm not sure if you actually care about putting the sorted numbers anywhere or not, but I'll show you how].
In A2, put the following and copy right:
=RANK.EQ(A1,1:1,0)
This wlil show you the order number of each column, in the row below it.
To put your items in a proper descending order in row 3, put this in A3 and copy right:
=LARGE(1:1,COLUMN())
Note that using COLUMN assumes that your data is continuous and starts at row 1. Otherwise, we will need another way to figure out which place the formula is currently at within each cell.
Upvotes: 1