- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# hero007
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim Sh As Worksheet, Rng As Range
- With Sheets("TOP10")
- Sheets("¤u§@ªí1").Rows(1).Copy .Range("A1")
- .UsedRange.Offset(1) = ""
- .Activate
- End With
- Application.ScreenUpdating = False
- Set Rng = Sheets("¤u§@ªí1").Cells(1, Sheets("¤u§@ªí1").Columns.Count)
- Sheets("¤u§@ªí1").Range("A:A").AdvancedFilter xlFilterCopy, , Rng, True
- 'AdvancedFilter(¶i¶¥¿z¿ï): [°Ó«~Ãþ§O]¤£«½ÆªºÓ¶µ ¨ì Rng
- Rng.Sort Rng, xlAscending, Header:=xlYes 'Sort : ±Æ§Ç
- Set Sh = Sheets.Add '³o¬¡¶Ã¯¤¤·s¼W¤u§@ªí
- Set Rng = Rng.Offset(1) '¤U²¾¤@¦C
- Do While Rng <> ""
- With Sheets("¤u§@ªí1")
- .Range("A1").AutoFilter 1, Rng 'AutoFilter(¦Û°Ê¿z¿ï): [°Ó«~Ãþ§O]ªº·Ç«h= Rng
- .Range("A:E").Copy Sh.[A1] '¦Û°Ê¿z¿ï«áªº¸ê®Æ½Æ»s¨ì·s¼W¤u§@ªí
- End With
- With Sh
- .Range("A1").AutoFilter Field:=4, Criteria1:="10", Operator:=xlTop10Items
- 'AutoFilter(¦Û°Ê¿z¿ï): [¼Æ¶q] ³Ì¤j¼ÆȪº«e10¶µ,
- '**·Ç«h Criteria1:="15" -> «e15¶µ ***
- .UsedRange.Offset(1).Copy Sheets("TOP10").Range("A" & Sheets("TOP10").Rows.Count).End(xlUp).Offset(1)
- '³Ì¤j¼ÆȪº«e10¶µ½Æ»s¨ìSheets("TOP10")
- End With
- Set Rng = Rng.Offset(1) '¤U²¾¤@¦C
- Loop
- Sheets("¤u§@ªí1").Cells.AutoFilter
- '¤u§@ªí¦³¦Û°Ê¿z¿ï,¦b¤@¦¸ªº¦Û°Ê¿z¿ï,¥i¨ú®ø¤u§@ªí¤Wªº¦Û°Ê¿z¿ï
- Rng.EntireColumn = ""
- Application.DisplayAlerts = False
- Sh.Delete
- Application.DisplayAlerts = True
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|