Random Number Generator in Excel

 If you want to insert random numbers into an Excel spreadsheet, Excel has two inbuilt Random Number Generator functions that you can use. They are the RAND and RANDBETWEEN functions. The RAND function is used if the number to be generated is between 0 and 1, and the RANDBETWEEN function is used to generate numbers between a given range.

RAND

If you need your Random Number Generator to come up with a number between 0 and 1, you need to use the formula =RAND().

  • Start by clicking on the cell that you wish to enter the random number.

  • Click on the formula tab and then select on Math & Trig.

  • From the drop down box select the RAND option.

  • When the Function Arguments dialogue box appears, just click OK.

  • A random number between 0 & 1 should now appear in your chosen cell.

list-of-random-numbers

 

RANDBETWEEN

To have your Random Number Generator to give a number between a given range, for example between 10 and 50, you will need to use the formula =RANDBETWEEN(10,50).

  • Click on the cell that you wish to enter the random number.

  • Click on the formula tab and then select Math & Trig.

  • From the drop down box select the RANDBETWEEN option.

  • In the Function Arguments dialogue box select the bottom and top numbers in your range and then click OK.

  • A random number between your given ranges will be generated.

To generate a decimal number between a given range, you use the rand function.

=10+40*RAND()

If you want to create a list of random numbers, you can use the Fill Handle on the bottom right of the cell and drag it down to create the list.

Once you have calculated a random number, every time that the sheet makes a calculation, a new random number will be generated. You can get around this by clicking on the formulas tab and then on Calculating Options and then in the drop down options choose manual to turn off automatic calculations.

randbetween-function