Excel Formula RAND
The RAND function is really simple and traditionally used for statistical analysis, cryptography, gaming, gambling, and probability theory, among dozens of other things. In Excel, the RAND function generates a random number between 0 and 1. Note; however, that every time you enter new data and press the Enter key, the list of random numbers you just created changes. If you need to maintain your random numbers lists, you must format the cells as values.
1. Enter the function =RAND() in columns A3 through A14. Select that column and press Ctrl+C (for copy) or click the Copy button under the Home tab and choose Copy from the drop-down menu. Move your cursor to cell B3 and select Home > Paste > Paste Special. Click the Values button from the Paste Special dialog window, then click OK.
2. Now the list contains values instead of functions, so it will not change. Notice (in the formula bar) that the random numbers have 15 digits after the decimal (Excel defaults to 9), which you can change, if necessary (as displayed in cell F3). Just click the Increase Decimal button in the Number group under the Home tab.
3. If you prefer to work with whole numbers, enter this formula in cell F3: =INT(RAND()*999) and you get a 3-digit random number. Copy the formula down through F12, then add another ‘9’ to the string to add another digit to your random number—e.g., four nines equal four digits, five nines equal five digits. Again, you must copy the list and Paste as Values to maintain a static list.