WorksheetFunction.RandBetween Method
Returns a random integer number between the numbers you specify. A new random integer number is returned every time the worksheet is calculated.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function RandBetween ( _
Arg1 As Object, _
Arg2 As Object _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Object
Dim Arg2 As Object
Dim returnValue As Double
returnValue = instance.RandBetween(Arg1, _
Arg2)
double RandBetween(
Object Arg1,
Object Arg2
)
Parameters
Arg1
Type: System.ObjectBottom - the smallest integer RANDBETWEEN will return.
Arg2
Type: System.ObjectTop - the largest integer RANDBETWEEN will return.
Return Value
Type: System.Double