
Use the RANDBETWEEN function to generate
random values in a specified range
To generate randomized values in a specified range, such as from 1
to 49, use the RANDBETWEEN function. This function returns a
random number in the range you specify, returning a new random
number every time the worksheet is calculated. If this function is
not available and returns the #NAME? error, install and load the
Analysis ToolPak add-in.
RANDBETWEEN(bottom, top)
bottom: The lowest integer in the range.
top: The highest integer in the range.
4
To create random values from 1 to 49:
1. Select cells A2:D10 and type the following formula:
=RANDBETWEEN(1,49).
2. Press <Ctrl+Enter> ...