Microsoft Excel Tips
and Tricks
Generate Random Numbers in Excel
Some types of analysis require you to use randomly generated
numbers. You can also use randomly generated numbers to
quickly populate an Excel spreadsheet. There's an easy
function you can use to do this automatically. Here are a
few of the ways you can use it:
§
Type =RAND()
in a cell to generate a number between 0 and 1.
§
Type =RAND()*100
to generate a number between 1 and 100.
After entering a function, you can then use the fill handle
to quickly populate as many cells as you'd like with random
numbers. To use the fill handle, click the cell, move your
pointer over the lower-right corner of the cell until it
turns into a black plus sign, and drag it horizontally or
vertically across the cells you wish to populate.
Editor's Note:
To change the number format of your random numbers (for
example, if you'd prefer whole numbers to decimal points),
click Cells on the Format menu. In the Format
Cells dialog box, click the Number tab and then click
Number in the Category list. Then in the
Decimal places box, enter the number zero and click
OK.
|