- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 5# qaqa3296
¸ê®Æsheetsªº¸ê®Æ¦ì¸m»Pì¨ÓÀɮתº¦ì¸m¤£¤@¼Ë¡Aקï¦p¤U¡A½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁ¡C
Sub test2()
Dim Arr, Ar, Brr(1 To 10000, 1 To 4), xD, T, i&, j%, n%
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range([¬d¸ß!K1], [¬d¸ß!A65536].End(3))
For i = 2 To UBound(Arr)
For j = 2 To UBound(Arr, 2)
If Arr(i, j) <> "" Then Ar = Ar & "," & Arr(i, j)
Next
xD(Arr(i, 1) & "") = Mid(Ar, 2): Ar = ""
Next
Arr = Range([¬d¸ß2!B1], [¬d¸ß2!A65536].End(3))
For i = 2 To UBound(Arr): xD(Arr(i, 1) & "") = Arr(i, 2): Next
Arr = Range([¸ê®Æ!A1], [¸ê®Æ!B65536].End(3))
For i = 2 To UBound(Arr)
T = Arr(i, 1): n = n + 1
If xD.Exists(T & "") Then
Brr(n, 1) = T: Brr(n, 2) = Arr(i, 2)
Ar = Split(xD(T & ""), ",")
For j = 0 To UBound(Ar)
n = n + 1: Brr(n, 3) = Ar(j)
Brr(n, 4) = xD(Brr(n, 3) & "")
Next
Else
Brr(n, 1) = T: Brr(n, 2) = Arr(i, 2)
End If
Next
Sheets("µ²ªG").Range("A2").Resize(n, 4) = Brr
End Sub |
|