Let’s have a little bit of fun in Excel. There may be a time when you need or just would like to have a list or a table or random numbers in a spreadsheet. How hard is it to create that manually? You may get stuck on a sequence of numbers, or just get bored and use the same again and again. But wait, Excel can do it for you with the use of a function. See, it isn’t always maths!
The random formula
Excel has three formulae for the creation of random numbers:
Rand
Randbetween
Randarray
=rand()
If you are looking for random numbers with decimal places then the first is the easiest. This function has no arguments to fill you just use it as is. It does return a random number greater than or equal to 0 and less than 1, and evenly distributed.
- Select a cell.
- Type the following: =rand().
- Press the enter key to see the result.

The illustration above shows the formula and the result.
- Press the [F9 key] (which is the recalculate function) and a new number is displayed.

Autofill down then right and you get this result. 
Once again, the first number has changed.
=Randbetween()
This function returns a random whole number between (and including) the numbers you specify.
You can use the Function wizard to help you. 
- Type the lowest number you require in the top line and the highest number in the bottom line.
Here are my numbers.
- Select the OK Button, and hey, presto.

You can now autofill this to as many cells as you require. 
Once again, the first number has changed.
= Randarray()
This function returns an array of random numbers, so you won’t have to autofill the cells you need to fill after you use the function for the first time. But it does allow for more choices. 
- Type in the number of rows you require.
- The number of columns.
- The lowest number and the highest.
Then if you require an integer (a whole number, that can be a positive, negative or zero) or ones with decimal places type in [True] for a whole number and [False] for decimals. 
Here is the result. 
Have some fun with this by changing the arguments and integer settings.

Here is an example of decimal numbers.
Please note that you may need to check that you have decimals displayed with the decimal tool from the number section in the Home tab.

Note: If you want to keep the numbers from changing every time you add a new formula or recalculate stuff in your spreadsheet, then copy and paste the result as a value.
Also: these numbers are not entirely mathematically random. You will find that a few numbers will consistently reoccur.
More for your palette
Shortcut keys in Excel for Data, Functions and Formula Bar (5 of 8)
















