Hello Everyone,
I am trying to sort column A in my Tab & have the larger number sort to the top once I enter my tab.
It is running when I enter but my syntax must be incorrect as the largest number in Column A in Excel 365 is not sorting to the top.
Helppppppp Please advise - Thanks so much
Here is the VBA code I am using:
I am trying to sort column A in my Tab & have the larger number sort to the top once I enter my tab.
It is running when I enter but my syntax must be incorrect as the largest number in Column A in Excel 365 is not sorting to the top.
Helppppppp Please advise - Thanks so much
Here is the VBA code I am using:
VBA Code:
Sub Worksheet_Activate()
'
' RnkSrt Macro
'
RowCount = ActiveSheet.UsedRange.Rows.Count
Range(Cells(1, 1), Cells(RowCount, 2)).Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Range("A1").Activate
End Sub
Last edited by a moderator: