RAND()
Syntax. RAND()
Definition. This function returns a random number between 0 and 1 with up to 16 decimal places.
Arguments. None
Background. The RAND() function returns a random number greater than or equal to 0 and less than 1.
To generate a random real number between a and b, use:
=RAND() • (b-a)+a
A new random number is returned every time the worksheet is calculated.
Example. The RAND() function is often used to fill a table with test data or to simulate processes in engineering and natural sciences. The formula has to be entered in each cell.
Tip: Use RAND() to generate a random number
If you want to use RAND() to generate a random number but don’t want the numbers to change every time the cell is calculated, you can enter =RAND() in the formula ...
Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.