Hi All,
Please could you assist me with the following code.
Basically the code works but when some of the totals match then the rank formula produces a tied number. So if 3 rows have a total of "5" in there column they will have the same rank. But then on the next ranked row it will skip the numerical order number by 2.
I basically need to use a similar ranked formula but I don't want the rank to skip numbers just because of tied numbers. So my table should end up looking like this.
[table="width: 500, class: grid, align: center"]
[tr]
[td]Total[/td]
[td]Rank[/td]
[/tr]
[tr]
[td]11[/td]
[td]1[/td]
[/tr]
[tr]
[td]11[/td]
[td]1[/td]
[/tr]
[tr]
[td]12[/td]
[td]2[/td]
[/tr]
[tr]
[td]13[/td]
[td]3[/td]
[/tr]
[tr]
[td]14[/td]
[td]4[/td]
[/tr]
[/table]
Thank you
GS
Please could you assist me with the following code.
Code:
Function RankOverallTotal()
Set Ranklist = Range("T3:T50")
For Each Rcell In Ranklist
Range(Rcell.Address).Offset(0, 1).Value = WorksheetFunction.Rank(Rcell.Value, Ranklist, 1) ' change 1 to 0 for desceending rank
Next Rcell
End Function
Basically the code works but when some of the totals match then the rank formula produces a tied number. So if 3 rows have a total of "5" in there column they will have the same rank. But then on the next ranked row it will skip the numerical order number by 2.
I basically need to use a similar ranked formula but I don't want the rank to skip numbers just because of tied numbers. So my table should end up looking like this.
[table="width: 500, class: grid, align: center"]
[tr]
[td]Total[/td]
[td]Rank[/td]
[/tr]
[tr]
[td]11[/td]
[td]1[/td]
[/tr]
[tr]
[td]11[/td]
[td]1[/td]
[/tr]
[tr]
[td]12[/td]
[td]2[/td]
[/tr]
[tr]
[td]13[/td]
[td]3[/td]
[/tr]
[tr]
[td]14[/td]
[td]4[/td]
[/tr]
[/table]
Thank you
GS