ranking with tie-breaker criteria based on larger or smaller value

valmir

Active Member
Joined
Feb 10, 2021
Messages
251
Office Version
  1. 365
Platform
  1. Windows
Hello everyone
I am using this formula:
=RANK.EQ(J1;$J$1:$J$16)+COUNTIF($J$1:J1;J1)-1
to rank a classification table however, in case of a tie, I want the row with the larger value in column I to rank higher. In this particular example, row 4 should be ranked above row 3 because row 4 has a higher value in column I than row 3. Same problem between rows 11 and 12 and from rows 13 to 16. I have added the current status and the desired outcome. Also, I would like to how it is in case I have to rank with the second criteria based on smaller value in column I). Thanks

Book1
ABCDEFGHIJKLMNOPQRSTU
11PET3300112+991PET3300112+99
22PRO321031+272PRO321031+27
33MAQ320143+163PRI220030+36
44PRI220030+364MAQ320143+16
55CAA312062+455CAA312062+45
66FER312043+156FER312043+15
77INT311133047INT31113304
88SAG311122048SAG31112204
99DES303044039DES30304403
1010ACA302112-1210ACA302112-12
1111CCU302135-2211SRC302112-12
1212SRC302112-1212CCU302135-22
1313BAI301219-8113WIL201112-11
1414LIB301215-4114SCC301203-31
1515SCC301203-3115LIB301215-41
1616WIL201112-1116BAI301219-81
Sheet1
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
=RANK.EQ(J1;$J$1:$J$16)+COUNTIFS($J$1:J1;J1; $I$1:I1;"<"&I1)
After applying your formula this is what I am getting. Not only it has no effect but it is also giving me some blanks. Am I doing something wrong?

Book1
ABCDEFGHI
1PET3300112+99
2PRO321031+27
3MAQ320143+16
4PRI220030+36
5CAA312062+45
6
7INT31113304
8
9DES30304403
10ACA302112-12
11SRC302112-12
12
13BAI301219-81
14LIB301215-41
15SCC301203-31
16WIL201112-11
Sheet1
 
Upvote 0
Maybe like this:

=RANK.EQ(J1,$J$1:$J$16)+COUNTIFS($J$1:$J$16,J1, $I$1:$I$16,">"&I1)
 
Upvote 0
Maybe like this:

=RANK.EQ(J1,$J$1:$J$16)+COUNTIFS($J$1:$J$16,J1, $I$1:$I$16,">"&I1)
With this one this is the result. Still not good
Book1
ABCDEFGHI
1
2PET3300112+99
3
4PRI220030+36
5MAQ320143+16
6
7CAA312062+45
8
9DES30304403
10ACA302112-12
11
12
13BAI301219-81
14WIL201112-11
15
16
Sheet1
 
Upvote 0
Book1
ABCDEFGHIJK
11PET3300112991
22PRO321031272
33MAQ320143164
44PRI220030363
55CAA312062455
66FER312043156
77INT311133047
88SAG311122047
99DES303044039
1010ACA302112-1210
1111CCU302135-2212
1212SRC302112-1210
1313BAI301219-8116
1414LIB301215-4115
1515SCC301203-3114
1616WIL201112-1113
Sheet1
Cell Formulas
RangeFormula
K1:K16K1=RANK.EQ(J1,$J$1:$J$16)+COUNTIFS($J$1:$J$16,J1, $I$1:$I$16,">"&I1)
 
Upvote 0
Solution
=RANK.EQ(J1,$J$1:$J$16)+COUNTIFS($J$1:$J$16,J1, $I$1:$I$16,">"&I1)
Can you please tell me which index match are you using to get that? Probably has to do with the one I am using?
=IFERROR(INDEX($B$1:$J$16;MATCH(A1;$K$1:$K$16;0);1);"") to =IFERROR(INDEX($B$1:$J$16;MATCH(A1;$K$1:$K$16;0);9);"")
 
Upvote 0
Can you please tell me which index match are you using to get that? Probably has to do with the one I am using?
=IFERROR(INDEX($B$1:$J$16;MATCH(A1;$K$1:$K$16;0);1);"") to =IFERROR(INDEX($B$1:$J$16;MATCH(A1;$K$1:$K$16;0);9);"")
 
Upvote 0
Thanks for the help even though I am stuck with blank rows because the index match formula I am using only shows one value whenever there are two exact maches but I know that it is not your fault. Your formula works perfectly. Thanks again!
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

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