- ©«¤l
- 913
- ¥DÃD
- 150
- ºëµØ
- 0
- ¿n¤À
- 1089
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2019
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-8-28
- ³Ì«áµn¿ý
- 2023-7-19
|
¦^´_ 28# oobird
Hi,
¥¨¶°°õ¦æ«á«ü¦V³o¦æ¦³°ÝÃD,Help!... For i = 0 To UBound(ar)- Sub Try()
- Workbooks("2012 samples Chart.xlsx").Activate
- For i = 2 To 7 '±q2ndªº¤u§@ªí°õ¦æ¦Ü7st
- Sheets(i).Activate
- Set sh = ActiveSheet
- sh.UsedRange = sh.UsedRange.Value '§â¤½¦¡µ²ªGÅܦ¨È
- sh.AutoFilterMode = False '¨ú®ø¦Û°Ê¿z¿ï
- sh.[a4:ad4].AutoFilter '«Ø¥ß¦Û°Ê¿z
- n = sh.[AC1000].End(3).Row 'acÄæ³Ì«áÀx¦s®æ¦C¸¹
- sh.Sort.SortFields.Clear '²M°£««Ø±Æ§Ç±ø¥ó
- ar = Array("ac", "u", "q", "c", "d")
- For i = 0 To UBound(ar)
- sh.Sort.SortFields.Add Key:=sh.Range(ar(i) & "5:" & ar(i) & n)
- Next
- With sh.Sort '¹ï«ü©w½d³ò¥H«ü©w±ø¥ó±Æ§Ç
- .SetRange sh.Range("A5:AD" & n)
- .Header = xlNo
- .MatchCase = False
- .Orientation = xlTopToBottom
- .SortMethod = xlPinYin
- .Apply
- End With
- Next '¤U¤@Ó¤u§@ªí
- End Sub
½Æ»s¥N½X |
|