Sub TestA()
Dim Arr, Brr, X, Y
Arr = [R2:R246]
[X2:Y246].ClearContents: Brr = [X2:Y246]
For D = 0 To 100 Step 5
For i = 1 To 245
If Not IsError(Arr(i, 1)) Then '不是〔錯誤值〕才進行計算
Brr(i, 1) = Int(Arr(i, 1) + Arr(i, 1) * (D / 100))
Brr(i, 2) = Int(Arr(i, 1) + Arr(i, 1) * (D / -100))
End If
Next
Next
[X2:Y246] = Brr
End Sub