VBA实例:高考分数投档指数分析(模块2.过程部分)

2021-03-29 12:26

阅读:340

标签:ott   cas   set   data   ati   values   ade   模块   tom   

Sub 记录排序() Rows("5:5").Select Rows("5:230").Select ActiveWorkbook.Worksheets("备选院校").Sort.SortFields.Clear ActiveWorkbook.Worksheets("备选院校").Sort.SortFields.Add Key:=range("I5:I500"), _ SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal ActiveWorkbook.Worksheets("备选院校").Sort.SortFields.Add Key:=range("C5:C500"), _ SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("备选院校").Sort .SetRange range("A5:AH500") .Header = xlGuess .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Rows("1:1").Select End Sub

Sub 投档排序()
    Rows("5:5").Select
    Rows("5:230").Select
    ActiveWorkbook.Worksheets("备选院校").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("备选院校").Sort.SortFields.Add Key:=range("T5:T500"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("备选院校").Sort
        .SetRange range("A5:AH500")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Rows("1:1").Select
End Sub

VBA实例:高考分数投档指数分析(模块2.过程部分)

标签:ott   cas   set   data   ati   values   ade   模块   tom   

原文地址:https://blog.51cto.com/12815848/2527923


评论


亲,登录后才可以留言!