- ©«¤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
|
Y·Q100,200,500¤À§O½s½X:
Sub ¬y¤ô½s¸¹()
Dim Arr, i&, P%, V&, N&, T1$, T2$, x%, TR, YR, SS&(3)
Arr = Range([c1], [b65536].End(xlUp)(1, 0))
TR = [{"A","F","B"}]
YR = [{64564,38000, 81140}]
For i = 3 To UBound(Arr)
If Arr(i, 1) = "¦Xp" Then Exit For
N = N + 1: Arr(i - 2, 1) = ""
P = Val(Arr(i, 2)): V = Val(Arr(i, 3))
x = Switch(P = 100, 1, P = 200, 2, P = 500, 3, P = P, 0)
If P = 0 Or V = 0 Or x = 0 Then GoTo i01
T1 = TR(x) & Format(YR(x) + SS(x) + 1, "0000000")
T2 = TR(x) & Format(YR(x) + SS(x) + V, "0000000")
Arr(i - 2, 1) = T1 & IIf(T1 = T2, "", "-" & T2)
SS(x) = SS(x) + V
i01: Next i
[d3].Resize(N) = Arr
End Sub |
|