Due to updates, over time, that have been made to the site and the age of this article, this post may not display correctly. In particular images may be missing or product reviews display incorrectly.

If this is the case and you'd particularly like me to fix it, then please reach out to me on Twitter.

To create a whole random number in Excel, place the following into the equation line :


Where min and max are the minimum and maximum values. For example…


This will generate a number between (and including) 1 and 10.

This will be recalculated every time the spreadsheet is opened. Alternatively, press F9 to update the number.

If you don’t want the numbers to change every time the cell is calculated, you can enter the equation into the formula bar and then press F9 to change the formula to a fixed random number.

All of the above works with OpenOffice, with the exception of using F9 in the formula bar to fix the result.