Upper Menu

Creating Random Numbers in Excel

Share Button

Have you ever needed to generate random dates in an Excel spreadsheet? You may not need it often, but when you do, this tip is quite handy. This is the kind of training we cover in our Advanced Excel class, and help you with in your office!

To create random numbers, use this formula:

The first argument, DATE(2003,1,1), is the low end of the range (earliest), and DATE(2014,9,30) was the high end of the range (most recent).

This creates a random date between 1/1/2003 and 9/30/14. Then, format the number so it appears as a “Date” to turn it into an understandable format.

Last, drag the AutoFill Handle (the little dot in the bottom corner of the cell) down to the bottom of my column to duplicate the formula.

If you want just a random number between two values, you would do the same thing, but replace the DATE(2003,1,1) with the low and high numbers.

Creating Random Numbers in Excel

Udemy Course Learn Excel in 3 Hours Flat


Need to learn Excel quickly? Check out Alicia’s online course, Learn Excel in 3 Hours Flat. For only $59 you get lifetime access to the course.


2 Responses to Creating Random Numbers in Excel

  1. van January 28, 2015 at 12:43 am #

    Hi my name is Van i would like to learn formula random numbers for lotteries, example from 1 to 40, just choice number myself, example numbers are 8-25-9-13-33-22-18-4-20-38-15-36-6-11-1…ete….play 7 numbers for 10 games then click random button, then come the results, at last 1 line will matching all number i choice? anyone can be training onside or can sale me the formats?

    hope someone can help.

    • Alicia Katz Pollock January 28, 2015 at 7:43 am #

      Hi Van,

      It’s not hard to choose 7 random numbers between 1 & 40 and string them together…but are you asking that one of them matches the one you’ve chosen yourself? You would have to include code to physically match the numbers with one of the answers to create a winner.

Leave a Reply