A friend of mine is familiar with working in Lotus 1-2-3 and has asked me for some assistance in converting to Excel or OpenOffice Calc. Of course I chose to post my Calc solutions here.
The formula for random number generation is quite easy.
=RAND()
This will get you a random number between zero and 1 (2 decimal places is the default format).
To generate a random number between two values, the formula is modified slightly to:
=RAND()*(b-a) + a
Where b is the higher value and a is the lower value.
Update: You can also use RANDBETWEEN (thanks to Jason):
=RANDBETWEEN(a; b)
For example, to generate a random number between 1 and 100, you would use the following formulae:
=RAND()*(100-1)+1 or
=RANDBETWEEN(1;100)
If you wish this to be a whole number (no decimal places), you can do this in one of two ways.
By Formula
You can modify the formula to include the ROUND function:
=ROUND(RAND()*(100-1)+1)
By Format
You can use the Delete Decimal Place icon on the toolbar and reduce the number of decimal places.
