- ©«¤l
- 561
- ¥DÃD
- 160
- ºëµØ
- 0
- ¿n¤À
- 725
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2014-9-10
- ³Ì«áµn¿ý
- 2024-8-7
|
dear sirs
1.¦p¤U±Nµ{¦¡copy¦Ü»Ý¨Dexcel ¶È±N sheet1§ïsheet62 sheet2§ïsheet106
1.1 °±©ó Arr = Range([Sheet62!d1], [Sheet62!a65536].End(3))
¥X²{ "¦¹³B¶·nª«¥ó" µLªk°õ¦æ???
2.·Ð¤£§[½ç±Ð thanks
Sub TEST()
Dim Arr, Brr, xD, i&, T$, U, a, b, N&
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range([Sheet62!d1], [Sheet62!a65536].End(3))
For i = 1 To UBound(Arr)
T = Arr(i, 1) & IIf(Arr(i, 2) = "A01", "", "|")
xD(T) = Trim(xD(T) & " " & i)
Next i
ReDim Brr(1 To 30000, 1 To 4)
For Each U In xD.keys
If xD(U & "|") = "" Then GoTo 101
For Each a In Split(xD(U), " ")
For Each b In Split(xD(U & "|"), " ")
N = N + 2
For i = 1 To 4
Brr(N - 1, i) = Arr(a, i)
Brr(N, i) = Arr(b, i)
Next
Next
Next
101: Next
[Sheet106!A11].Resize(N) = Brr
End Sub |
|