I often have to create ranks in Excel and it's time consuming when there are multiple rows of ranks based on Regional performance versus Divisional performance. I was wondering whether anyone has some code that they could share that would help in this process. I am thinking that if the code will be able to create ranks based on a sorted column's values, but start re-ranking every time the column value changes, it would be most useful.
I found some code on the web, not sure how to modify this to suit my needs
TIA,
Michael
I found some code on the web, not sure how to modify this to suit my needs
Code:
Sub SomewhatfasterRanking()
Application.ScreenUpdating = False
C = Selection.CurrentRegion.Columns.Count
Selection.CurrentRegion.Offset(0, C).Select
With Selection
.Value = "=RANK(RC[-5],R1C[-5]:R96C[-5])"
.Copy
.PasteSpecial Paste:=xlValues
End With
End Sub
Michael