Code: Select all
Activesheet.Sort.SortFields.Clear
Activesheet.Sort.SortFields.Add Key:=Range("C2:C57"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
Activesheet.Sort.SortFields.Add Key:=Range("B2:B57"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With Activesheet.Sort
.SetRange Range("A1:O57")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Code: Select all
Activesheet.Sort.SortFields.Clear
Activesheet.Sort.SortFields.Add Key:=Column(3), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
Activesheet.Sort.SortFields.Add Key:=Column(2), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With Activesheet.Sort
.SetRange Cells
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With