|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
请参考:- Sub Macro1()
- Application.ScreenUpdating = False
- With Range("A3:R" & Range("A65536").End(xlUp).Row)
- .Sort Key1:=Range("F3"), Order1:=1, key2:=Range("C3"), order2:=1, Header:=xlNo
- Application.AddCustomList ListArray:=Array("甲1", "甲2", "甲3", "甲4", "甲5", "甲6", "甲7", "甲8", "甲9")
- .Sort Key1:=Range("b3"), Order1:=1, Header:=xlNo, OrderCustom:=Application.CustomListCount + 1
- Application.DeleteCustomList ListNum:=Application.CustomListCount
- Application.AddCustomList ListArray:=Array("一队", "二队", "三队")
- .Sort Key1:=Range("a3"), Order1:=1, Header:=xlNo, OrderCustom:=Application.CustomListCount + 1
- Application.DeleteCustomList ListNum:=Application.CustomListCount
- End With
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|