- ©«¤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# joey0415
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim AR(), E As Variant, Rng As Range
- With Sheets("Sheet1")
- .Range("A1").CurrentRegion.Sort Key1:=.Range("B2"), Order1:=xlAscending, Key2:=.Range( _
- "A2"), Order2:=xlAscending, Key3:=.Range("D2"), Order3:=xlDescending, Header:=xlYes
- '.Range("A1").CurrentRegion.Sort"¸ê®Æªº±Æ§Ç
- .UsedRange.Columns(2).AdvancedFilter xlFilterCopy, , .Cells(1, .Columns.Count), True
- 'UsedRange.Columns(2)ªº¶i¶¥¿z¿ï-> ¤£«½ÆªºªÑ²¼
-
- '**¤T¤Q¸Uµ§¸ê®Æ ³o¨â¦æ·|ºC¤@ÂI
-
- AR = Application.Transpose(.Cells(1, .Columns.Count).CurrentRegion.Offset(1))
- '¨ú±oªÑ²¼¸m¤J¤@ºû°}¦C¤¤
- ReDim Preserve AR(1 To UBound(AR) - 1) '§R°£³Ì«á¤@µ§ªº(ªÅ¥Õ)¸ê®Æ
- .Cells(1, .Columns.Count).CurrentRegion.Clear '²M°£
- .Range("F1").CurrentRegion.Offset(1).Clear '²M°£Åã¥Ü«e¤Tµ§¸ê®Æªº°Ï°ì
- For Each E In AR
- Set Rng = .Range("B:B").Find(E, LookAT:=xlWhole) '§ä¨C¤@ªÑ²¼ªº²Ä¤@Ó¦ì¸m
- .Range(.Cells(Rng.Row, "A"), .Cells(Rng.Row + 2, "D")).Copy .Cells(.Rows.Count, "F").End(xlUp).Offset(1)
- Next
- End With
- End Sub
½Æ»s¥N½X |
|