How to Insert a Random Number in Excel

Date:2019-8-6 Author:Cordelia

Random numbers are quite useful in many situations of life and work. And it’s very simple to generate them with Excel function. Here’s the method.

1. Open the Excel file, click a cell and type the formula in it. If you want to generate a number in the range of 1-100, then input “=RANDBETWEEN(1,100)” .

How to Insert a Random Number in Excel

2. Press Enter (or click anywhere outside the cell). You’ll get a random number immediately.

How to Insert a Random Number in Excel

3. Put the cursor at the bottom right corner of the cell till it become a small black cross. Drag it to select all the cells you want to insert random numbers, then release the mouse.

How to Insert a Random Number in Excel

4. Now the randbetween function is applied to all these selected cells.

How to Insert a Random Number in Excel

5. If you want to generate random decimals, you should use rand function. Input “=RAND()” in the cell and press Enter.

How to Insert a Random Number in Excel

6. With fill handle, you can apply this formula to multiple cells as well.

How to Insert a Random Number in Excel

7. If the result is either “0” or “1”, the reason must be the setting of the cell format. Select the cells you want to insert random decimals and press [Ctrl+1] (or right click selected cells and choose Format Cells… in the menu).

8. You can choose Number in the Category of Number tab in the popping out window and check the setting of Decimal places. It can’t be “0” or else the decimals can’t be displayed. Here I typed “5” and hit OK to confirm it.

How to Insert a Random Number in Excel

9. Then the random decimals will display according to your setting.

How to Insert a Random Number in Excel

Copyright Statement: Regarding all of the posts by this website, any copy or use shall get the written permission or authorization from Myofficetricks.

Leave a Reply

Your email address will not be published. Required fields are marked *