Working with Worksheet Functions |
Use Excel's RAND() worksheet function to generate random numbers. Here's how:
Select a cell or range into which you want to enter a random numbers.
To enter random numbers between 0 and 10, type =RAND()*10; to enter random numbers between 0 and 100, type =RAND()*100 (quick now, what do you type to get numbers between 0 and 1000? Uh-huh). Press Enter to enter the formula into a single cell or Ctrl-Enter to enter it into a range.
Right click the selection and select Format Cells from the shortcut menu.
Click the Number tab.
In the Category box, select a category, then select the number of decimal places you need (if necessary).
Click OK.
Note that numbers generated by RAND() change every time you recalculate your worksheet. Use Paste Special to paste them into their cells as values if you don’t want them to change.
(Posted 07/09/2000)