- ©«¤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
|
Sub TEST()
Dim xE As Range, i&, j&, Num(2), xR As Range, U(3), UK&
Num(0) = [N4]: Num(1) = [L4]: Num(2) = [M4]
Set xE = Cells(Rows.Count, "G").End(xlUp)
For i = xE.Row To 6 Step -1
Set xR = Cells(i - 1, "G")
U(1) = xR(2, 4): U(2) = xR(1, 4): U(0) = U(1) - U(2)
If Abs(U(0)) <= Num(1) Or Abs(U(0)) >= Num(2) Then GoTo 101
U(3) = Int(Abs(U(0)) / Num(0)) - 1
If U(3) <= 0 Then GoTo 101
xR(2, 1).Resize(U(3)).EntireRow.Insert
xR.Resize(1, 3).Copy xR(2, 1).Resize(U(3), 3)
For j = 1 To U(3)
xR(j + 1, 4) = U(2) + Num(0) * j * IIf(U(0) >= 0, 1, -1)
Next j
101: Next i
End Sub
Xl0000599.rar (14.58 KB)
========================= |
|