anappleuser
02-27-2018, 10:42 AM
Hi Forum,
I am using this macro to apply Rank automatically. But I have to select the range manually and then I run the macro. Actually, I have data in more than 1500 Raws and selecting range manually and then run macro is very time-consuming. Is there any way to modify below macro to run for all 1500 raws? See attached image file also to get more idea. I want to apply RANK in between every "TOTAL".
Hope I am able to explain my question correctly.
Sub RankFOrmula()Selection.Offset(, 1).FormulaR1C1 = "=RANK(RC[-1]," & Selection.Address(1, 1, xlR1C1) & ")"
End Sub
I am using this macro to apply Rank automatically. But I have to select the range manually and then I run the macro. Actually, I have data in more than 1500 Raws and selecting range manually and then run macro is very time-consuming. Is there any way to modify below macro to run for all 1500 raws? See attached image file also to get more idea. I want to apply RANK in between every "TOTAL".
Hope I am able to explain my question correctly.
Sub RankFOrmula()Selection.Offset(, 1).FormulaR1C1 = "=RANK(RC[-1]," & Selection.Address(1, 1, xlR1C1) & ")"
End Sub