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

[µo°Ý] ¸ê®Æ¾ã²z

¦^´_ 9# ­ã´£³¡ªL
«e½ú¤È¦w
¥H¤U¬O¥Î¤T­Ó¦r¨å¤è¦¡³B¸Ì,½Ð«e½ú¦A«ü¾É!
ÁÂÁ«e½ú

Option Explicit
Sub TEST_20221028()
Dim Arr, i&, j&, T1, T2, T3, W, X, Y, Z, C, R
Arr = Range([¸ê®Æ!c1], [¸ê®Æ!a1].Cells(Rows.Count, 1).End(xlUp))
Set X = CreateObject("Scripting.Dictionary")
Set Y = CreateObject("Scripting.Dictionary")
Set W = CreateObject("Scripting.Dictionary")
For i = 2 To UBound(Arr)
   T1 = Arr(i, 1)
   T2 = Arr(i, 2)
   T3 = Format(Arr(i, 3), "0000")
   Y(T1) = ""
   X(T2 & "|" & T3) = ""
   W(T1 & "|" & T2 & "|" & T3) = T3
Next
ReDim Arr(1 To Y.Count + 1, 1 To X.Count + 1)
i = 1
For Each R In Y.KEYS
   i = i + 1
   Arr(i, 1) = R
   j = 1
   For Each C In X.KEYS
      j = j + 1
      Arr(i, j) = W(R & "|" & C)
      Arr(1, j) = IIf(i = 2, C, Arr(1, j))
   Next
Next
Arr(1, 1) = "¡@¡@¡@­ì®Æ¡@½s¸¹"
With [§e²{ªí!A1].Resize(UBound(Arr), UBound(Arr, 2))
    .Value = Arr
    .Columns(2).Resize(, UBound(Arr, 2)).Sort Key1:=.Cells(1, 2), Order1:=xlAscending, Header:=xlNo, Orientation:=xlLeftToRight
    .Rows(2).Resize(UBound(Arr)).Sort Key1:=.Cells(2, 1), Order1:=xlAscending, Header:=xlNo, Orientation:=xlTopToBottom
    .Rows(1).Replace "|*", "", Lookat:=xlPart
    .Borders.LineStyle = 1
End With
End Sub

TOP

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD