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