- ©«¤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
|
¦^´_ 17# oobird
Hi oobird,
°õ¦æok.
½Ð±Ð»yªk°ÝÃD:
1) ¥H¤U´À´«¬°§A©Ò¼gªº¥t¤@»yªk(¦p¤Uªí):
For i = 5 To 12 (§Ú¨Ï¥Îªºsample¦]¬°1~3¤ë¥÷¤w§R°£,©Ò¥H§Ú±N¤§§ï¬°2~7)
Sheets(i).Activate '°õ¦æ¤u§@
Next
¦ýµLªk°õ¦æ,¬O§_§Ú§âþ¸Ìµ¹§ï¿ù¤F?
2) ¥t¤@»yªk If InStr("MayJunJulAugSepOctNovDec", sh.Name) Then
§Ú¬Ý¨ì¤Wz2Ó»yªk³£¬On±N¨C¤@毎¤u§@ªí¼g¥X¨Ó,§Ú·Qª¾¹D¦³¨S¦³"«ü©w¦¡"ªº?(¨Ò:±qsheet(May)¶}©l¦Ü³Ì«á¤@Ó¤u§@ªí,¦Ó¤£¥Î±NMay¤§«áªº¨CÓ¤u§@ªí³£¦C¥X?- Workbooks("2012 samples Chart.xlsx").Activate
- For i = 2 To 7 '±q2ndªº¤u§@ªí°õ¦æ¦Ü7st
- Sheets(i).Activate '°õ¦æ¤u§@
- 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
- End If
- Next '¤U¤@Ó¤u§@ªí
- End Sub
½Æ»s¥N½X |
|