Creating a random number in Excel

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.

Posted by David Artiss

Enterprise Happiness Engineer for the WordPress VIP team at Automattic. Gamer, film lover and general fan of all things Marvel, Star Trek and Star Wars. Failed comedian. Writer for The Big Tech Question. World's Greatest Grandma.

Talk to me!

This site uses Akismet to reduce spam. Learn how your comment data is processed.