Ranking by group and breaking a tie

monkeyspank

Board Regular
Joined
Feb 12, 2014
Messages
73
I would like to Rank value by the month and breaking any ties ( anything where 2 or more might be ranked the same ). I would also like to exclude value that is blank from the ranking.

MonthMeasured MetricRank
11/1/2015
11/1/20151.3845146291
11/1/20150.7254283323
11/1/20150.6280717674
11/1/2015
11/1/20151.3686753842
11/1/2015
12/1/2015
12/1/2015
12/1/20150.8682022992
12/1/20150.5559060583
12/1/20150.5986633481
12/1/2015

<tbody>
</tbody>

<tbody>
</tbody>
 

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.
Shouldn't the Rank for 12/1/2015 be 1,3,2 instead of 2,3,1?

If so, then try:

=IFERROR(RANK(B2,INDIRECT(ADDRESS(MATCH(A2,A$2:A2,0)+1,2)&":"&ADDRESS(COUNTIF(A:A,A2)+MATCH(A2,A$2:A2,0)+1-1,2))),"")

EDIT: Doesn't include tie breaker sorry.
 
Last edited:
Upvote 0
with tie breaker

=IFERROR(RANK(B2,INDIRECT(ADDRESS(MATCH(A2,A$2:A2,0)+1,2)&":"&ADDRESS(COUNTIF(A:A,A2)+MATCH(A2,A$2:A2,0)+1-1,2)))+COUNTIFS(A$2:A2,A2,B$2:B2,B2)-1,"")
 
Last edited:
Upvote 0
I'm not sure I am understanding how this formula works. I want to rank metric data in each month and if there are more than one that could be at a certain rank .. I would like a tiebreaker.

Month Metric Rank
10/1/20161.359201107
10/1/20160.828404297
10/1/20160.764605503
10/1/20160
10/1/20161.949740035
10/1/20160.51079656
10/1/20161.032300388
10/1/20161.184803944
10/1/20161.311917819
10/1/20160.917141466
10/1/20160.984437812
10/1/20160.584931827
10/1/20160.625241491

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,272
Members
449,149
Latest member
mwdbActuary

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