0
我想将我的数组设置为0小数位。我知道它必须是一些number.format=0
。但我不知道该把它放在哪里。对于我的代码格式抱歉,它不是灰色的,因为我不知道要使用它。VBA中的数字格式
Option Explicit
Option Base 1
Function arraydemo(r As Range)
Dim cell As Range, i As Integer, x(40, 1) As Double
i = 1
For Each cell In r
x(i, 1) = Rnd * 40
i = i + 1
Next cell
arraydemo = x
End Function