當b值達到100左右時就會溢位,想請問如何解決
程式碼如下所示:
Sub cal()
Dim b As Long
n = Range("H3")
r = Range("H4")
b = Range("H5")
For i = 3 To n + 2
Cells(i, 4) = Cells(i, 2) ^ b ← 溢位
Cells(i, 5) = WorksheetFunction.Ln(Cells(i, 2))
Next i
Cells(6, 8) = (WorksheetFunction.Sum(Range(Cells(3,4),Cells(n+2,4)))/r)^(1/ b)
End Sub
謝謝