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.


My name is Stephanie Krishnan and I'm passionate about the way that open source software and its community can help small businesses and individuals with their productivity and lives. One of the biggest arguments I get from business owners, however, is lack of support options. I decided to put together my own support blog to help people be productive at various levels with one of my favourite open source alternatives: OpenOffice.org! I do this through tutorials, downloadable templates and answers to questions from readers!

