WorksheetFunction.RandBetween Method (Excel)

Returns a random integer number between the numbers you specify. A new random integer number is returned every time the worksheet is calculated.


expression. RandBetween( _Arg1_ , _Arg2_ )

expression A variable that represents a WorksheetFunction object.


Name Required/Optional Data Type Description
Arg1 Required Variant Bottom - the smallest integer RANDBETWEEN will return.
Arg2 Required Variant Top - the largest integer RANDBETWEEN will return.

Return Value


See also

WorksheetFunction Object