The fastest way to randomize dates in Excel is to combine RANDBETWEEN with the DATE function: type =RANDBETWEEN(DATE(2026,1,1),DATE(2026,12,31)) into a cell and press Enter. Excel returns a random date between those two limits. Because the result recalculates every time the sheet does, you will usually want to convert the formula to a fixed value afterward, and that conversion step (copy, then Paste Special > Values) is the part most people miss.

Random dates are useful for building practice datasets, filling a training sheet with sample records, creating test scenarios for a spreadsheet you are about to hand to someone else, or picking random dates for a quiz. The method below works in Excel for Microsoft 365, Excel 2021 and 2019 on Windows and Mac. Menu labels can differ slightly by version and platform, but the functions and the Paste Special command are stable across all of them.

What You'll Need

  • Microsoft Excel (desktop version recommended, since Paste Special and drag-fill are easiest there). Excel for the web supports the same functions but the copy-and-paste routine is slightly different.
  • An empty column, or a copy of your workbook if you are adding random dates next to existing data.
  • A clear idea of your start date and end date, written in YEAR, MONTH, DAY order so they plug straight into the DATE function.
  • Basic comfort with typing a formula in the formula bar and pressing Enter.

Step-by-Step

  1. Click the first empty cell where you want the first random date to appear. Leave at least one empty column between your random dates and any real data, so a mis-typed formula cannot overwrite anything.

  2. Type the RANDBETWEEN formula using DATE limits. For example, to get a date somewhere in 2026, enter:

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

    The DATE function builds a real Excel date from year, month and day, so you never have to remember what serial number a date corresponds to. If you would rather hard-code serial numbers, you can, but the DATE version is far easier to read and edit later.

  3. Press Enter. The cell shows a number, not a date, at first. That is normal: Excel stores dates as serial numbers, so the formula is working correctly and only the display needs fixing.

  4. Format the cell as a date. With the cell selected, open the Home tab and use the Number Format dropdown to choose Short Date or Long Date. If you need a custom layout such as dd/mm/yyyy, choose More Number Formats, pick Custom and type the pattern you want.

  5. Fill the formula down the column. Drag the small square at the bottom-right corner of the cell (the fill handle) down as many rows as you need, or select a range, type the formula and press Ctrl+Enter (Cmd+Return on Mac) to fill every selected cell at once. Each row now holds an independent random date.

  6. Copy the whole column of results. Select the cells, press Ctrl+C (Cmd+C on Mac). This is the step that makes the dates permanent.

  7. Paste them back as values. Right-click the same selection, choose Paste Special, then choose Values. If you prefer the keyboard, use Alt+E, S, V on Windows, or find Paste Special in the Edit menu on Mac. The formulas are replaced by plain date values, so they will never change again.

  8. Check a sample. Click a few of the pasted cells and look at the formula bar. It should show a date like 14/03/2026, not a formula starting with =RANDBETWEEN. If you still see the formula, the paste did not land as values, so repeat step 7.

  9. Sort or filter only after the values conversion. Sorting random formulas themselves causes them to recalculate and shuffle again mid-sort, producing duplicates and confusing results. Once the column is static values, sorting and filtering behave normally.

Common Mistakes

Forgetting to convert to values. RANDBETWEEN is volatile: it recalculates whenever Excel recalculates, which happens on every edit, on open, and when you press F9. The same cell can show a different date a minute later. Converting with Paste Special > Values is the only reliable fix.

Typing the dates as text instead of using DATE. Writing =RANDBETWEEN("1/1/2026","12/31/2026") may work if Excel interprets those strings as dates, but it breaks in regions that read dates as day-first, and it fails outright if the cell is formatted as text. As a rule, enter the limits as DATE(yyyy,mm,dd) to avoid ambiguity.

Putting the end date before the start date. RANDBETWEEN requires the bottom limit to be less than or equal to the top. Reversing them returns a #NUM! error.

Leaving the cells in General format. A random serial number like 46000 looks like nonsense until you apply a date format. This is not an error, just a display issue.

Expecting unique dates. Random numbers can repeat. If you need each row to have a different date, generate more than you need and remove duplicates, or use a helper column to flag repetitions and regenerate.

Tips

To randomize dates across a specific range such as a whole year but only weekdays, add a filter step after conversion and delete weekend rows, or use WORKDAY with a random offset for a formula-based approach.

For a time stamp rather than just a date, combine the date formula with RAND(): multiply RAND() by 1 (one day) and add it to the random date, then format as date with time. The fractional part of the number is what represents the clock time.

Generate the number of rows you need plus about 10 percent extra. Random results cluster, and having spares makes it painless to swap out duplicates or rows that fall on a date you do not want.

Keep your original formula in a scratch column far to the right, or in a second sheet, so you can create a fresh batch later without rebuilding the formula from memory.

Troubleshooting

The dates keep changing. You are looking at live formulas. Select the column, copy it, and use Paste Special > Values. Also check the workbook is not set to automatic calculation in a way that surprises you: on the Formulas tab, look at Calculation Options; Manual stops recalculating until you press F9, but it does not make formulas permanent.

You see #NUM! in the cell. The lower limit is larger than the upper limit, or the dates are stored as text. Rewrite both limits with DATE and confirm the order is start then end.

You see #VALUE!. Something in the formula is not a number: a stray quote mark, a locale that uses a different argument separator (some regions use semicolons instead of commas), or an empty cell reference. Rewrite the formula by hand rather than pasting from a web page that carries invisible characters.

The cell shows a number like 46357. Apply a date format from the Number Format dropdown on the Home tab.

Dates look like the wrong day or month. Excel is applying a regional date interpretation. Format the cell explicitly as dd/mm/yyyy or mm/dd/yyyy to match your region, and keep the DATE function for the inputs.

Paste Special > Values is greyed out. You are likely trying to paste into a protected sheet or into a location that overlaps the copied range. Unprotect the sheet (Review tab) or paste into a different column first, then move the values.

Frequently Asked Questions

Why do my random dates change every time I edit the sheet?

Because RANDBETWEEN is a volatile function and recalculates with every edit. Convert the results to fixed values with Paste Special > Values to freeze them.

Can I randomize dates in Excel for the web?

Yes. The functions work the same. The copy-and-paste routine differs slightly: use Ctrl+C and then choose Paste Special from the paste dropdown if it is available in your browser version; otherwise copy the column into a desktop Excel file, paste as values there, and paste the static values back.

How do I get random dates with no duplicates?

Generate more dates than you need, select the column after converting to values, and use Data > Remove Duplicates. Then take the number of rows you need from the top.

Can I randomize dates between two cells instead of typed limits?

Yes: =RANDBETWEEN(A1,B1) where A1 holds the start date and B1 the end date. Both cells must contain real dates, not text.

Does RANDBETWEEN include the start and end dates?

Yes, both limits are inclusive, so the first and last day of your range can appear in the results.

Can I undo the randomization later?

Once you have pasted the values, the original dates are gone. Keep a backup copy of the workbook, or an extra sheet with the original data, before you overwrite anything.