RAND
Description
Returns a random number between 0 and 1 by default, or between different limits that
you specify. This function is volatile; it generates a new random number any time
any cell changes in the workbook. To generate a random number only when you cause
the formula to run, such as by selecting
, use RANDCONST().
Syntax
RAND()
Example
Formula | Result |
|---|---|
=RAND() | varies (between 0 and 1) |
=50*RAND() | varies (between 0 and 50) |
=RAND()*(50-10)+10 | varies (between 10 and 50) |
Notes
- The function doesn't run as a volatile function if the Worksheets calculation mode is set toManualin .
- If you need one-time-only calculation, for any formula, enclose it in the ONCE function.
Related Functions
ONCE
RANDCONST