ranking

numberonetwin

New Member
Joined
Jul 24, 2007
Messages
49
what formula would be used to rank scores if you had the following



name score
participant 1 14
participant 2 27
Participant 3 19


to get this result

Participant 2 27
Participant 3 19
Participant 1 14
 
just not sure about what to put in my range in the formula

so if my chart looked like this
cellb-------cellc------cellld

name-----score-----rank

player ----15---------1
player-----14---------2


what would my range be to sort the player, score and rank?
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
If your data is layed out like this:
Excel Workbook
ABCD
1NameScoreRank
2participant 1143
3participant 2271
4Participant 3192
Sheet


This code will sort by Score:
Code:
Sub SortByScore()
' SORT range congruent to B2, descending, by Column C
    Range("B2").CurrentRegion.Sort Key1:=Range("C2"), Order1:=xlDescending, Header:=xlGuess _
        , OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
End Sub
This code uses "CurrentRegion", which sets the range to sort to all cells "congruent" to cell B2. That is, all cells adjacent to B2.
Click B2 and then hit Ctrl-Shift-*
This will show you what all is being used in the Sort.
It will select all cells adjacent to B2 until there is an empty row/column.
 
Upvote 0
I know this is a very old post but it has the exact thing I am looking for (Aladin's reply), where the name and data are in 2 cells, I want it displayed in another set of cells showing the highest score and attaching the persons name.

Here is my example - I would love it if someone could generate the exact code for me. I'll use the cell letters which are in my spreadsheet. Note the data begins from row 28 (eg A28, AA28) and ends on row 44.

A AA
Bilal 96
Jack 192
Philip 317
Ricky 148
Sandeep 114
Simon 30
Andrew 114
Daniel 142
Edmund 58
Jihan 265
Kaizad 164
Matthew 402
Reuben 61
Sanjay 116
Steve 290
Sunday 140
Tony 256

I would like the results displayed in AG for the ranked name, and AH for the ranked score.

Hope that makes sense.
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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