- ©«¤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-23
|
Sub TEST()
Dim Arr, xD, i&, j&, N&, T$, U&
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range([RAW!CE1], [RAW!A1].Cells(Rows.Count, 1).End(xlUp))
For i = 2 To UBound(Arr)
T = Arr(i, 3): If Len(T) <> 13 Then GoTo 101
T = Left(T, 12) & "X": U = xD(T)
If U = 0 Then
For j = 1 To UBound(Arr, 2): Arr(N + 2, j) = Arr(i, j): Next
Arr(N + 2, 3) = T: N = N + 1: xD(T) = N: GoTo 101
End If
For j = 4 To UBound(Arr, 2)
Arr(U + 1, j) = Val(Arr(U + 1, j)) + Val(Arr(i, j))
Next j
101: Next i
With Sheets("After")
.UsedRange.ClearContents
If N = 0 Then Exit Sub
.[A1:CE1].NumberFormatLocal = "@"
.[A1:CE1].Resize(N + 1) = Arr
End With
End Sub
Xl0000452.rar (68.83 KB)
|
|