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:
- Click on cell E1 in the spreadsheet - the location where the results will be displayed.
- Click on the Formulas tab of the ribbon menu.
- Choose Math & Trig from the ribbon to open the function drop down list.
- Click on RANDBETWEEN in the list to bring up the function's dialog box.
- Click on the "Bottom" line in the dialog box.
- Type the number 1 (one) on this line.
- Click on the "Top" line in the dialog box.
- Type the number 10 (ten) on this line.
- Click OK.
- A random number between 1 and 10 should appear in cell E1.
- To generate another random number, press the F9 key on the keyboard.
- When you click on cell E1 the complete function = RANDBETWEEN ( 1 , 10 ) appears in the formula bar above the worksheet.