Fresh Excel Tips

Quick and Easy Excel Tips and Tutorials

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. Here is the syntax that is used:
RANDBETWEEN(bottom, top)
bottom: The lowest integer in the range.
top: The highest integer in the range.

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.
  3. Press Ctrl+C to copy the filled cells.
  4. From the Edit menu, select Paste Special.
  5. In the Paste Special dialog box, select the Values option button to paste only the values, and click OK.

Use the RANDBETWEEN function to generate random values in a specified range

Random values are sometimes used for mathematic studies or for programming a lottery.

This tip is compatible with Excel 97, 2000, 2003 and 2007.

Use the RANDBETWEEN function to generate random values in a specified range
  1. How to Use the RAND function to generate random values in Excel
  2. Using the SUM function to Sum a Range of Values in Excel
  3. How to Use the MAX function to find the largest value in a range
  4. How to use the COUNTIF function to count values in Excel
  5. How to Use the PRODUCT function to multiply values in Excel

Leave a Reply