ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ·JÁ`¤£¦P¤u§@ªí¦b¤@­ÓÁ`ªí¡A

¦^´_ 1# armin0521

­Y¬O¥ÎVBAªº¤è¦¡¨Ó¸Ñ¨M¡A±z¯à±µ¨ü¶Ü??

TOP

¦^´_ 1# armin0521
  1. Sub test1()
  2.     Sheets.Add after:=Sheets(Sheets.Count)
  3.     Sheets(Sheets.Count).Name = "Á`ªí"
  4.     Sheets(Sheets.Count).[a1] = "©m¦W"
  5.     Sheets(Sheets.Count).[b1] = "¼Æ¶q"
  6.     Sheets(Sheets.Count).[c1] = "¤é´Á"
  7.     Sheets(Sheets.Count).[d1] = "¨Ó·½¤u§@ªí"
  8.     For i = 1 To Sheets.Count - 1
  9.         Sheets(i).Range("b1:b3").Copy
  10.         Sheets(Sheets.Count).[a65535].End(xlUp).Offset(1).PasteSpecial Transpose:=True
  11.         Cells(Selection.Row, 4) = Sheets(i).Name
  12.     Next
  13.    
  14.     Sheets("Á`ªí").Sort.SortFields.Add Key:=Range("C2:C" & [c65535].End(xlUp).Row), Order:=xlAscending
  15.     Sheets("Á`ªí").Sort.SortFields.Add Key:=Range("B2:B" & [b65535].End(xlUp).Row), Order:=xlAscending
  16.     With Sheets("Á`ªí").Sort
  17.         .SetRange Range("A1:D" & [c65535].End(xlUp).Row)
  18.         .Header = xlYes
  19.         .MatchCase = False
  20.         .Orientation = xlTopToBottom
  21.         .SortMethod = xlPinYin
  22.         .Apply
  23.     End With
  24.     MsgBox "¦X¨Ö§¹¦¨"

  25.    
  26. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : °µ¦n¨Æ¤£¯à¤Ö§Ú¤@¤H¡A°µÃa¨Æ¤£¯à¦h§Ú¤@¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD