Link to home
Start Free TrialLog in
Avatar of vegas86
vegas86

asked on

Auto sort macro by surname then first name

Hello,

I have the following macro currently in my sheet,

'
' AutoSortApplication
    Range("A11:XFC5000").Sort Key1:=Range("F11"), Order1:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:= _
        False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
End Sub

how do I edit this so it also then sorts by first name ascending the range would be E11. At the moment it is only sorting surnames but I woiuld like it to then sort the first names accordingly.
ASKER CERTIFIED SOLUTION
Avatar of StephenJR
StephenJR
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vegas86
vegas86

ASKER

Works perfectly, thank you!!