筛选

Selection.AutoFilter
ActiveWorkbook.Worksheets("基础数据").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("基础数据").Range("A2:I2").Select
Selection.AutoFilter
ActiveWorkbook.Worksheets("基础数据").AutoFilter.Sort.SortFields.Add Key:=Range( _
"I2:I" & lnu2), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal

With ActiveWorkbook.Worksheets("基础数据").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply

posted @ 2020-04-03 18:05  TryMyBest!  阅读(320)  评论(0编辑  收藏  举报