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

`=INT((RAND()*max)+min)`

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

`=INT((RAND()*10)+1)`

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.