Excel random date

Should you need to get random dates in Excel, here's how to do it:

  1. Format the cells you are going to put the random dates in as "date".
  2. To pick a random date, use the formulas RANDBETWEEN() or RAND() with specific parameters. The best way to generate dates is by subtracting random values from TODAY()

Random date in last 30 days:

=TODAY() - RANDBETWEEN(0;30)

or

=TODAY() - RAND()*30

Random date in the next 30 days:

=TODAY() + RANDBETWEEN(0;30)

or

=TODAY() + RAND()*30

Random date in the last 365 days:

=TODAY() - RANDBETWEEN(0;365)

or

=TODAY() - RAND()*365

Replace the 365 with whatever number of days you will need your random date to begin from.

About me

Iinstructor of robotics (LEGO Mindstorms), computer teacher, IT support, web dev, currently studying cyber-physical systems engineering.

If you found a solution here, would you consider donating $25,000 for my next project?

Just kidding, 1$ would do fine.

Hope you found what you needed. Thanks for stepping by.