Ranking Riddle

bc4240

Board Regular
Joined
Aug 4, 2009
Messages
134
Office Version
  1. 365
Platform
  1. Windows
So here's the set up. I need to rank a time in Column S in ascending order (fastest to slowest), but with consideration of the number of penalties in Column T. It seems like it should be easy, but it's a bit vexing.

The ranking is no problem as long as everyone has a slightly different time.

But if by chance two opponents had the same time....one as a result of no penalty and the other as a result of a penalty....I want the team with the most penalties to be ranked lower.

Untitled-1.jpg


In the above example you can see how the original Ranking attempt (yellow) is displayed using this formula in U2 and copied down to U9 - RANK(S2,$S$2:$S$9,1)+COUNTIFS($S$2:$S$9,S2,$T$2:$T$9,"<"&T2)

Ranking values are the same for the 00:.28.275 times although one of those times has 2 penalties and the other has only 1. The same happens for the 00:33.456 times although one has 0 penalties...one has 1 and the other has 3 penalties.

It should be:

00:33.456 - 0 - 5
00:33.456 - 3 - 7
00:33.456 - 1 - 6

If I re-rank Column U again in Cloumn V2:V9 using the same formula but referencing the Rank1 column ratrher than the Time Column - RANK(U2,$U$2:$U$9,1)+COUNTIFS($U$2:$U$9,U2,$T$2:$T$9,"<"&T2)

I get closer but still it's not assigning the highest rank to the highest penalty holder with the same scores.

Any ideas??
 
That once again suggests that those values are not all exactly the same.
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
You are certainly correct.... I saw this thread


Which suggest that the way I have my values presented is causing the RANK Function to misbehave. If I copy and past the time values or in my case use the userform to create the times with functions and then try to rank them I get the a misfire on the RANK Function. But if I just type in the values like this they rank perfectly.

Rank Wrong 2.png


Any ideas for work around to this problem??
 
Upvote 0
If you leave the times as numbers, rather than converting to text, does it rank correctly?
 
Upvote 0
YES!!! SOLUTION!!!

If you remember I said this above:

My number values are the same. I am using a user form to enter the time and the number of penalties. I enter the time as straight numbers 23456 (00:23.456) and then from the cell where that straight number is entered I convert the value using =TIME(0,0,E2)*10+TEXT(P2,"00\:00\.000") where TIME(0,0,E2) is the number of penalties times 10 seconds each.

but if I use this formula in those cells instead. It ranks correctly.

NUMBERVALUE(TIME(0,0,E2)*10+TEXT(P2,"00\:00\.000"))

Thanks Fluff for helping me think about this differently.
 
Upvote 0
Solution
Glad it's sorted & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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