WorksheetFunction.RandBetween method (Excel)
Returns a random integer number between the numbers that 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. |
Double
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.