Rank Subsets of Data by Multiple Criteria

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
I'd like to rank data within groups, by multiple values (in a hierachy), so if Value1 is equal between 2 elements in the same group then rank by column 2, 3, etc
e.g. the data would appear like this where ranking in descending order:


GroupValue1Value2Rank
A1043
A1241
A1052
B1033
B1142
B1521
C1242
C1233
C1451

Note, the group sizes may not be the same, and the data may not be ordered by group (I've just done that for ease of reading).

Thanks,
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
This gives the same results as the example but I'm not entirely convinced that it will be accurate with larger data sets. Also, the wording in your question has me thinking that there could be more value columns as well, if that is the case then I have a feeling that this it could be heading towards destination impossible.
Book2
ABCD
1GroupValue1Value2Rank
2A1043
3A1241
4A1052
5B1033
6B1142
7B1521
8C1242
9C1233
10C1451
Sheet5
Cell Formulas
RangeFormula
D2:D10D2=COUNTIFS(A:A,A2,B:B,">"&B2)+COUNTIFS(A:A,A2,B:B,B2,C:C,">="&C2)
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,126
Members
452,381
Latest member
Nova88

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