ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¸ó¤u§@ªí±Æ§Ç°ÝÃD

[µo°Ý] ¸ó¤u§@ªí±Æ§Ç°ÝÃD

·Q½Ð±Ð¤@¤U¤j®v­Ì~
¥H¤U¬O§Ú¥Î¿ý»s¥¨¶°ªº¤è¦¡¡A·Q­n©T©w±Æ§Ç¨C­Ó¬¡­¶"C6:AI14"¸ê®Æ¡A¦ýÁ`¦@¦³31­Ó¬¡­¶¡A«o¤£¯à¸ó¬¡­¶¦P®É±Æ§Ç
©Ò¥H§Ú¥²¶·­n¨C­Ó¬¡­¶°µ¬Û¦P±Æ§Ç°Ê§@¡A¥H¤U¥u¦³¿ý»s¨ì²Ä4­Ó¬¡­¶...........
½Ð°Ý¦³Â²¤Æªº¼gªk¶Ü¡H¯uªº«D±`·PÁ£¬¡ã¡ã¡ã¡ã¡ã¡ã¡ã¡ã¡ã


Sub ¥¨¶°1()
    Sheets("1").Select
    Range("C6:AI14").Select
    ActiveWorkbook.Worksheets("1").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("1").Sort.SortFields.Add Key:=Range("D6:D14"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("1").Sort
        .SetRange Range("C6:AI14")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Sheets("2").Select
    Range("C6:AI14").Select
    ActiveWorkbook.Worksheets("2").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("2").Sort.SortFields.Add Key:=Range("D6:D14"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("2").Sort
        .SetRange Range("C6:AI14")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Sheets("3").Select
    Range("C6:AI14").Select
    ActiveWorkbook.Worksheets("3").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("3").Sort.SortFields.Add Key:=Range("D6:D14"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("3").Sort
        .SetRange Range("C6:AI14")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Sheets("4").Select
    Range("C6:AI14").Select
    ActiveWorkbook.Worksheets("4").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("4").Sort.SortFields.Add Key:=Range("D6:D14"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("4").Sort
        .SetRange Range("C6:AI14")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
End Sub

¦^´_ 1# msmplay
  1. Sub Test()
  2.     Dim i As Integer
  3.     For i = 1 To 31
  4.         With Sheets(CStr(i))
  5.             .Sort.SortFields.Clear
  6.             .Sort.SortFields.Add key:=.Range("D6"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
  7.             With .Sort
  8.                 .SetRange Range("C6:AI14")
  9.                 .Header = xlGuess
  10.                 .MatchCase = False
  11.                 .Orientation = xlTopToBottom
  12.                 .SortMethod = xlPinYin
  13.                 .Apply
  14.             End With
  15.         End With
  16.     Next
  17. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 2# stillfish00

S¤j~~~~~~~¶W¯Å·PÁÂ!!

TOP

        ÀR«ä¦Û¦b : ¤f»¡¤@¥y¦n¸Ü¡A¦p¤f¥X½¬ªá¡F¤f»¡¤@¥yÃa¸Ü¦p¤f¦R¬r³D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD