Excel排序vba代码

Sub paixu()
Range("A3:p26").Select
Selection.Sort Key1:=Range("F7"), Order1:=xlAscending, Key2:=Range("G7") _
, Order2:=xlAscending, Key3:=Range("C3"), Order3:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
SortMethod:=xlPinYin, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal, DataOption3:=xlSortNormal
End Sub

原文地址:https://www.cnblogs.com/wzshhynk/p/12268910.html