1. Home
  2. Computing & Technology
  3. Spreadsheets

Excel 2007 RANDBETWEEN Function

By Ted French, About.com

Generate Random Numbers with Excel 2007'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:

Note: For help with this example, see the image to the right.

  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.


Related Articles
More Spreadsheets Quick Tips

Explore Spreadsheets

More from About.com

  1. Home
  2. Computing & Technology
  3. Spreadsheets
  4. Excel Functions
  5. Math Functions
  6. Random Numbers - Excel Random Numbers

©2008 About.com, a part of The New York Times Company.

All rights reserved.