New Tool Radar

AI for Data & Spreadsheets

How to Restrict Dates to a Valid Range With Excel Data Validation

Set a date-range rule with Excel data validation so invoice or event dates outside the valid period, including future dates, are blocked.

Schematic with three steps: Set the Date rule with a start; Block future dates where they are not; Test dates inside, outside and after today.

A date typed in the wrong order or a future date on an invoice usually means a slip, and date errors break sorting, ageing and period totals. A date-range rule blocks dates outside the period you define, and a rule ending at TODAY blocks future dates entirely.

What you need

  • Excel with the date column ready
  • The earliest and latest valid dates
  • A note of the date format your system expects

Step 1: Set the Date rule with a start and end

Select the date cells, open Data, Data Tools, Data Validation, choose Allow: Date and Between, then enter the start and end dates in a format your system recognises, or point them at cells holding the dates.

Step 2: Block future dates where they are not allowed

For a column where future dates make no sense, such as invoice dates, set the end date to the formula =TODAY(). The rule then moves with the calendar and always blocks tomorrow.

Step 3: Test dates inside, outside and after today

Type a date inside the range, one before the start, one after the end, and one future date. Only the inside date must be accepted; if a test fails, check the date format matches your system settings.

Worked example: synthetic invoice dates in November 2026

The table below is a synthetic example. It shows the expected result of testing a date-range rule; no workbook was opened.

Date tested In range? Result
2026-11-15 Yes Accepted
2026-10-01 No – before start Blocked
2026-12-05 No – after end Blocked
2027-02-01 No – future date Blocked

Expected result (UNTESTED). the in-range date is accepted and the three out-of-range dates, including the future date, are blocked. The date rule works as intended. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Type dates in a format your system recognises, or Excel will reject the rule itself.
  • A date rule does not stop a date stored as text; check the values are real dates.
  • Validation rules are not re-checked on values already in the cells; use Circle Invalid Data for those.

Sources

See all