Name

RAND

Synopsis

You can use RAND to determine a random number between and 1. When you use this function, each time the worksheet is opened or recalculated a new number is generated.

To Calculate

RAND(  )

There are no arguments required for this function.

Customizing the Range of Random Numbers

You can change the range of random numbers by multiplying the results by a specific value. For example, if you want the random numbers between and 10, multiply the results by 10. Keep in mind you will still get decimal values.

Example

Figure 14-19 illustrates the differences between using RAND and RANDBETWEEN. Both functions produce random numbers that are regenerated whenever you recalculate the worksheet.

RAND returns a decimal value between 0 and 1, whereas RANDBETWEEN returns integer values within the specified range

Figure 14-19. RAND returns a decimal value between 0 and 1, whereas RANDBETWEEN returns integer values within the specified range

Note

To find random numbers within a certain range, use RANDBETWEEN.

Get Excel 2000 in a Nutshell 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.