Order values

dungeon1976

New Member
Joined
Jul 22, 2014
Messages
7
Hi,

I don't know if this can be done in without VBA.

I want to rank (descending) values in a column. That could be easily done with the RANK formula, however if there are ties the value after the rank tie will take into consideration the number of tied values and add it to to get the order of the next value.

Example:
Raw values
A 5
B 3
C 5
D 4
F 3
G 0

Descending ranking using the RANK formula
1- A 5
C 5
3- D 4
4- B 3
F 3
6- G 0

What I wanted to look like would be:
1- A 5
C 5
2- D 4
3- B 3
F 3
4- G 0

Is there any way to get this?

Any help would be appreciated... :)

Thanks.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Do you need something like this?

Raw data(help)Sorted dataRank
A51A51
B34C51
C52D42
D43B33
F35F33
G06G04

<tbody>
</tbody>

Formulas:
(help) column:
Code:
=COUNTIF($B$2:B2, ">="&B2) + COUNTIF(B3:$B$7, ">"&B2)
Sorted data (letters):
Code:
=INDEX($A$2:$A$7,MATCH(ROW() - ROW($D$2) + 1, $C$2:$C$7, 0))
Sorted data (values):
Code:
=INDEX($B$2:$B$7,MATCH(ROW() - ROW($D$2) + 1, $C$2:$C$7, 0))
Rank column:
First field is set to 1, the next one is:
Code:
=IF(E3=E2, F2, F2+1)

Let me know if that's what you want. If you have any questions feel free to ask.
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,399
Members
449,447
Latest member
M V Arun

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top