Rank from highest to lowest

masterton

New Member
Joined
Jul 16, 2014
Messages
14
Highest score wins.
We determine who is the champion(s), 2nd, 3rd winner etc.
If two winners have the same highest score, both are 1st winner. The next will be 3rd winner.
If three winners have the same highest score, three are 1st winner. The next will be 4th winner.
The same logic applies to 2nd, 3rd winners and so on.

For example:
Score of different competitors
John || Mary || Sam || Susan || Helen
10 || 8 || 8 || 6 || 3

Champion: John
2nd winner: Mary, Sam
3rd winner: --
4th winner: Susan
5th winner: Helen

How could I write a series of formula which can rank and list the winners automatically?

Click to see the sample sheet for an overview and example.

Thanks a lot for your answer. ^_^
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
masterton,

I see from your sample sheet that you are concatenating the names of tied winners, within the same cell.

My first thought is that it will be difficult for you achieve this with a formula, even if you only have five competitors.

Here is a UDF that might help you get the job done.

In the vba editor, (Alt-F11), insert a code module and copy in the below code....

Code:
Function WiNames(NameRng As Range, ScoreRng As Range, Place As Integer) As String
For Each cell In ScoreRng
c = c + 1
If WorksheetFunction.Rank(cell, ScoreRng, 0) = Place Then
WName = NameRng(1, c)
If WiNames = "" Then
WiNames = WiNames & WName
Else
WiNames = WiNames & ", " & WName
End If
End If
Next cell
If WiNames = "" Then WiNames = "  --"
End Function

The arguments are
NameRng the range that contains the competitors names
ScoreRng the range that contains the competitors names
Place the winning place you require names for

Below is an example of how I have used it with your sample data set but with an extra two competitors so that you can see how you can extend it to as many competitors as you wish and only return as many winning places as you wish.
Note that the formula in B2 will copy across and down. I have used the COLUMNS() function to give an incrementing value for Place as the formula is copied to the right.



Excel 2007
ABCDEFGHIJKLM
1EventChampion2nd3rd4th5thJohnMarySamSusanHelenTomCharlie
2AAJohnMary, Sam--SusanHelen, Charlie10886323
3BBMary, Susan--JohnSam, Helen--6949421
4CC
Sheet5
Cell Formulas
RangeFormula
B2=IFERROR(WiNames($G$1:$M$1,$G2:$M2,COLUMNS($B2:B2)),"")
Hope that helps.
 
Upvote 0
masterton,

I see from your sample sheet that you are concatenating the names of tied winners, within the same cell.

My first thought is that it will be difficult for you achieve this with a formula, even if you only have five competitors.

Thanks a lot.

There will be more than 5 competitors in the real case.
It would be the best if it is achievable without macro.
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,537
Members
449,088
Latest member
RandomExceller01

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