Pinterest Pixel

RANDBETWEEN Function for Excel Dates

What does it do? Generates random dates, in between a start date and an end date Formula... read more

Download Excel Workbook
Bryan
Posted on

Steps To Follow

Overview

RANDBETWEEN Function for Excel Dates | MyExcelOnline RANDBETWEEN Function for Excel Dates | MyExcelOnline

What does it do?

Generates random dates, in between a start date and an end date

Formula breakdown:

=RANDBETWEEN(bottom, top)

What it means:

=RANDBETWEEN(starting date for random date generation, end date for random date generation)


 

If you need to create a quick sample data set of Dates, the RANDBETWEEN function in Excel is very handy to use.

All you need is to provide a start Date and an end Date. Then the function will immediately generate a random Date following that Date range you have provided.

This is how it is done below (go to the bottom of the page if you want to see the animated gif tutorial):

RANDBETWEEN Function for Excel Dates | MyExcelOnline
Download excel workbookRandbetween-Dates.xlsx

 

STEP 1: We need to enter the Randbetween function

=RANDBETWEEN

 

STEP 2: The Randbetween arguments: Enter the Start Date (bottom) and the End Date (top).

We need to use the DATE function to create the Date inputs for the bottom and top Dates.

See also  How Many Days in 3 Months with Simple Formulas in Excel

In our example, we need to generate a random date from January 1, 2016 (bottom) to December 31, 2016 (top).

=RANDBETWEEN(DATE(2016,1,1), DATE(2016,12,31))

 

STEP 3: However notice that our random dates are in the numerical format:

RANDBETWEEN Function for Excel Dates

 

Highlight the dates and change it into the Short Date Format:

RANDBETWEEN Function for Excel Dates

 

Now we have our Random Dates:
RANDBETWEEN Function for Excel Dates

NB: Each time you make a change in a workbook that contains the RANDBETWEEN function, the formulas will get updated and new values will appear!  This will also happen each time you press the F9 key..try it!

To lock in the formulas, you will need to hard code the formulas by selecting the data, CTRL+C, Right Click and Paste As Values.

 

If you like this Excel tip, please share it
RANDBETWEEN Function for Excel Dates | MyExcelOnline RANDBETWEEN Function for Excel Dates | MyExcelOnline

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...