The syntax for the Rand function is simply:
If you want to create a random number between two numbers, (where a is the smallest number and b is the largest number), you can use the following:
If you want only Whole Numbers you can use:
For example, =RANDBETWEEN(1,200) will produce a random whole number between 1 and 200.
So how can you use this nifty little function? It can be used in myriad ways; for example, it can be used in conjunction with other functions to create a Password Generator. There are countless statistical applications, but you can also use it for entertaining applications. For example, one Excel Enthusiast used it create a Tetris-style game in Excel.
I have used the RAND function in conjunction with other functions and graphics to create a Slot Machine in Excel (send me a request at firstname.lastname@example.org if you would like a copy of the Slot Machine spreadsheet).
The RAND function. Great for use in statistical applications, as well as some RANDom FUN!