1. Computing

Excel RANDBETWEEN Function

Generate Random Numbers in Excel

By

Generate Random Numbers with Excel's RANDBETWEEN Function

Excel's RANDBETWEEN Function

© Ted French

If you want to generate random numbers in Excel between, say 1 and 10, use the RANDBETWEEN function. This function allows you to specify the range of numbers it is to pick from.

The syntax for the RAND function is:

= RANDBETWEEN ( Bottom , Top )

Bottom - the lowest number the function is to use.

Top - the highest number the function is to use.

Example Using Excel's RANDBETWEEN Function:

  1. Click on cell E1 in the spreadsheet - the location where the results will be displayed.

  2. Click on the Formulas tab of the ribbon menu.

  3. Choose Math & Trig from the ribbon to open the function drop down list.

  4. Click on RANDBETWEEN in the list to bring up the function's dialog box.

  5. Click on the "Bottom" line in the dialog box.

  6. Type the number 1 (one) on this line.

  7. Click on the "Top" line in the dialog box.

  8. Type the number 10 (ten) on this line.

  9. Click OK.

  10. A random number between 1 and 10 should appear in cell E1.

  11. To generate another random number, press the F9 key on the keyboard.

  12. When you click on cell E1 the complete function = RANDBETWEEN ( 1 , 10 ) appears in the formula bar above the worksheet.

©2014 About.com. All rights reserved.