- ©«¤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# ji12345678
¨Ï¥Î Sort ¤èªk [±Æ§Ç]- Option Explicit
- Sub Ex()
- Dim E As Range, Sh As Worksheet
- Set Sh = Sheets("Sheet1") '³]©wÅÜ¼Æ : ¸ê®Æ©Ò¦bªº¤u§@ªí
- Application.ScreenUpdating = False '°±¤î : »È¹õªº§ó·s
- With Sheets.Add '·s¼W¤@¤u§@ªí
- Sh.[A:B].Copy '¸ê®Æ½Æ»s
- .[A1].PasteSpecial Paste:=xlPasteValues '¿ï¾Ü©Ê¶K¤W : ¶È¶K¤WÈ
- .[C1] = "¦ì¸m"
- For Each E In .Range(.[C2], .[B2].End(xlDown).Offset(, 1)) 'Cø󪺽d³ò
- E = E.Offset(, -1).Address(0, 0) '¼g¤WBÄ檺¦ì¸m
- Next
- With .Range("A1").CurrentRegion '[A1].ªº©µ¦ù½d³ò
- .Sort Key1:=.Range("B2"), Order1:=xlDescending, Header:=xlYes '±Æ§Ç : xlDescending (»¼´î: ¥Ñ¤j¨ì¤p), xlAscending (»¼¼W: ¥Ñ¤p¨ì¤j)
- '.Sort Key1:=.Range("B2"), Order1:=xlDescending, Key2:=.Range("A2"), Order2:= xlDescending , Header:=xlYes
- '²Ä1±Æ§Ç : ¼Æ¶q, ²Ä2±Æ§Ç: «~¦W
- .Rows(1).Resize(6).Copy Sh.[G2] '½Æ»s:[A1].ªº©µ¦ù½d³ò:ªº6¦CÂX¥R ¨ì ¸ê®Æ©Ò¦b¤u§@ªíªº[G2]
- End With
- Application.DisplayAlerts = False '°±¤î:¨t²Îªº´£¿ô
- .Delete '§R°£:·s¼Wªº¤u§@ªí
- Application.DisplayAlerts = True '«ì´_:¨t²Îªº´£¿ô
- End With
- Application.ScreenUpdating = True '«ì´_:»È¹õªº§ó·s
- End Sub
½Æ»s¥N½X |
|