'¤¤¤å«~¶µ¦X¨Ö
Set d = CreateObject("Scripting.Dictionary")
For Each T In Range([T7], [T300].End(xlUp))
If d(T.Value) = "" Then
d(T.Value) = T.Offset(, -6) & " " & T.Offset(, -4) & " " & T.Offset(, -3)
Else
d(T.Value) = d(T.Value) & ", " & T.Offset(, -6) & " " & T.Offset(, -4) & " " & T.Offset(, -3)
End If
Next
ReDim Arr(1 To d.Count, 0), Brr(1 To d.Count, 0)
For Each k In d.keys
N = N + 1: Arr(N, 0) = k: Brr(N, 0) = d(k)
Next
[Y7].Resize(N, 1) = Arr
[AF7].Resize(N, 1) = Brr
'=========================================
'^¤å«~¶µ¦X¨Ö
Set d1 = CreateObject("Scripting.Dictionary")
For Each T In Range([T7], [T300].End(xlUp))
If T.Offset(, 2) = "" Then GoTo AA
If d1(T.Value) = "" Then
d1(T.Value) = T.Offset(, -5) & " " & T.Offset(, 2) & " " & T.Offset(, -3)
Else
d1(T.Value) = d1(T.Value) & ", " & T.Offset(, -5) & " " & T.Offset(, 2) & " " & T.Offset(, -3)
End If
AA: Next
N = 0: ReDim Arr(1 To d1.Count, 0)
For Each k In d1.items
N = N + 1: Arr(N, 0) = k
Next
[AG7].Resize(N, 1) = Arr
Sub A_To_B()
Dim mRow&, Crr, Y As Range, YR, C%
Set d = CreateObject("scripting.dictionary")
mRow = Sheets("¤u§@ªí2").[B500].End(xlUp).Row + 1
For Each Y In Range([Y7], [Y300].End(3))
d(Y & "") = Array(Y.Offset(, -1), Y, Y.Offset(, 6), Y.Offset(, 8), "", Y, "PKG", Y.Offset(, -1), Y.Offset(, 7), "", Y.Offset(, 3) / Y.Offset(, -1), Y.Offset(, 3), Y.Offset(, 4), Y.Offset(, 5))
If C = 0 Then C = UBound(d(Y & "")) + 1
Next
N = 0
¦r¨åÀɪºitem¬O°}¦C, ¥²¶·³v¤@½Õ¥Î
ReDim Crr(1 To d.Count, 1 To C)
For Each k In d.keys
N = N + 1
YR = d(k & "")
For j = 1 To C: Crr(N, j) = YR(j - 1): Next
Next
With Sheets("¤u§@ªí2") .Range("B" & mRow).Resize(N, C).Value = Crr 'range«e¤Ö¤@Ó "."
.Activate
End With
End Sub