Random Date Generator (Excel Formula)

HomeExcel FormulasRandom Date Generator (Excel Formula)

In this tutorial, we will learn a simple way to generate random dates between two dates (start date and end date). For this, you need to use two different functions that you can use in different situations.

  • RANDBETWEEN
  • RANDARRAY

Generate Random Dates with RANDBETWEEN

In Excel, we have a function called RANDBETWEEN that takes a start value and an ending value to generate random values between them, and you can use this function to generate random dates.

  1. First, specify a start date from which you want to start your random dates.
  2. Next, specify an end date to have an upper limit for random dates.
  3. After that, enter the function “RANDBETWEEN” in a cell.
  4. Now refer to the cells where you have the start and end date in the arguments.
  5. From here, hit enter to get a single random date in the cell.
  6. In the end, drill down that cell up to the cell where you want to have the random dates.
randbeetween-for-random-dates

random_date_generator.xlsx

=RANDBETWEEN($A$2,$B$2)

In the above formula, we have used the RANDBETWEEN function with a start date and an end date.

As you can see, we have frozen the cell reference to both cells A2 and B2 by using the dollar sign ($).

And after that, we have to drill down the formula up to cell C11 to get the 10 random dates.

Using RANDARRAY for Random Dates

There’s one more function that you can use to generate random numbers and that’s RANDARRAY. This function also takes a starting date and an ending date.

When you use RANDARRAY, you need to specify how many dates you want to generate. And this you need to specify in the terms of columns and rows.

randarry-for-random-dates

=RANDARRAY(10,2,A2,B2)

In the above formula, I have specified the 10 rows and 2 columns and it has generated 20 random dates (10 x 2) in the result.

Note: Both of the functions that we have used above are volatile, which means that if you re-calculated your sheet calculations, all the dates will be re-generated.