下面这段代码能满足你的要求,但运行速度有点慢,期待哪位大神给个更好的
Sub test()
Application.ScreenUpdating = False
Dim x&
For x = Cells(Rows.Count, 1).End(xlUp).Row + 1 To 1000
If Range("a" & x - 1) > 10000 Then
Range("a" & x - 1) = ""
Exit Sub
Else
Range("b" & x - 1) = Range("a" & x - 1) + Range("a" & x - 1) * 0.025
Range("a" & x) = Range("b" & x - 1)
End If
Next
Application.ScreenUpdating = True
End Sub
cells(1,2)=cells(1,1)*1.025
cells(2,1)=cells(1,2)
for i = 2 to [A1].end(xldown).row
cells(i,1)=cells(i-1,2)
cells(i,2)=cells(i,1)*1.025
next