|
请教:对排序无用的代码什么意思?其它有无瘦身的可能?
Sub Macro1()
Columns("A:A").Select
ActiveWorkbook.Worksheets("Sheet2").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet2").Sort.SortFields.Add Key:=Range("A2:A246") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet2").Sort
.SetRange Range("A1:A246")
'.Header = xlYes
'.MatchCase = False
'.Orientation = xlTopToBottom
'.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub Macro3()
Columns("A:A").Select
ActiveWorkbook.Worksheets("Sheet2").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet2").Sort.SortFields.Add Key:=Range("A2:A246") _
, SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet2").Sort
.SetRange Range("A1:A246")
'.Header = xlYes
'.MatchCase = False
'.Orientation = xlTopToBottom
'.SortMethod = xlPinYin
.Apply
End With
End Sub
|
|