Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub Sort_Ranges()
Application.ScreenUpdating = False
'Sort range "pa"
'Worksheets("Parts_a").Select 'example re above note
Range("pa").Select
ActiveCell.Offset(0, 10).Name = "sort_1"
ActiveCell.Offset(0, 5).Name = "sort_2"
Selection.Sort _
Key1:=Range("sort_1"), Order1:=xlAscending, _
Key2:=Range("sort_2"), Order1:=xlAscending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
'Sort range "pb"
Range("pb").Select
ActiveCell.Offset(0, 10).Name = "sort_1"
ActiveCell.Offset(0, 5).Name = "sort_2"
Selection.Sort _
Key1:=Range("sort_1"), Order1:=xlAscending, _
Key2:=Range("sort_2"), Order1:=xlAscending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
'Sort range "pc"
Range("pc").Select
ActiveCell.Offset(0, 10).Name = "sort_1"
ActiveCell.Offset(0, 5).Name = "sort_2"
Selection.Sort _
Key1:=Range("sort_1"), Order1:=xlAscending, _
Key2:=Range("sort_2"), Order1:=xlAscending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
'Sort range "pd"
Range("pd").Select
ActiveCell.Offset(0, 10).Name = "sort_1"
ActiveCell.Offset(0, 5).Name = "sort_2"
Selection.Sort _
Key1:=Range("sort_1"), Order1:=xlAscending, _
Key2:=Range("sort_2"), Order1:=xlAscending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Application.Goto Reference:="R1C1"
Application.ScreenUpdating = True
End Sub