- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-27
|
¦^´_ 15# starbox520 - Sub TEST()
- Dim Arr, Brr, xD, Dn&, T$, N&, i&, j%
- Arr = Range([¤u§@ªí1!A1], [¤u§@ªí1!A1].Cells(Rows.Count, 1).End(xlUp)(1, 5))
- Set xD = CreateObject("Scripting.Dictionary")
- ReDim Brr(1 To UBound(Arr), 1 To 8)
- For i = 2 To UBound(Arr)
- T = Arr(i, 1) & "|" & Arr(i, 3) & "|" & Arr(i, 4)
- Dn = xD(T)
- If Dn = 0 Then
- N = N + 1: Dn = N: xD(T) = N
- For j = 1 To 3: Brr(Dn, j) = Arr(i, Array(1, 3, 4)(j - 1)): Next
- End If
- j = Int(InStr("---BK-VM-TR-PK-", "-" & Split(Arr(i, 2), "_")(1) & "-") / 3)
- If j > 0 Then
- Brr(Dn, j + 3) = Brr(Dn, j + 3) + Arr(i, 5)
- Brr(Dn, 8) = Brr(Dn, 8) + Arr(i, 5)
- End If
- Next i
- If N = 0 Then Exit Sub
- With Sheets("¤u§@ªí3")
- .UsedRange.Offset(1, 0).Clear
- .[A2].Resize(N, 8) = Brr
- Application.Goto .[A1]
- End With
- End Sub
½Æ»s¥N½X
Xl0000164.rar (23.32 KB)
|
|