填滿最後一個月餘額
For x = 8 To 18 ' 2024.01.20
For M = 1 To Mx
Srr(x + 4) = Brr(x + 4)(M, 0) '記錄最後一月餘額
Next M
For M = Mx + 1 To 12
Brr(x + 4)(M, 0) = Brr(x + 4)(Mx, 0)
Next
Next x作者: shuo1125 時間: 2024-1-22 14:01
34# 不是給段代碼了, 將無交易的月份沿用上月或更上月的餘額
1//只填至有交易最大月份
For M = 2 To 12
If Brr(x + 4)(M, 0) = 0 And M <= Mx Then Brr(x + 4)(M, 0) = Brr(x + 4)(M - 1, 0)
Next M
2//填滿12個月
For M = 2 To 12
If Brr(x + 4)(M, 0) = 0 Then Brr(x + 4)(M, 0) = Brr(x + 4)(M - 1, 0)
Next M