To allow only a specific date in Excel, select the cells, then choose Data > Data Validation. Set Allow to Date and use the comparison rule and date limits you need; for one exact date, choose equal to and enter that date. This blocks many invalid entries, but it does not prevent every kind of paste or fill operation from bypassing validation.
How date validation works
Excel stores dates as serial numbers, so a date-validation rule compares the underlying date value rather than merely checking whether a cell looks like a date. For example, a rule can allow dates between January 1 and December 31 of a specified year, or permit only dates on or after today.
In Microsoft 365 for Windows, select the target cell or range and open Data > Data Validation. On the Settings tab, choose Date in the Allow list. Choose a condition such as between, equal to, greater than, or less than, then supply the date or dates that define the rule. Excel’s date criteria use the same comparison logic as other numeric limits.
The Error Alert tab controls what happens when someone types a value that fails the rule. Keep Show error alert after invalid data is entered selected to display a warning. A Stop alert prevents the invalid entry through ordinary typing; Warning and Information alerts allow the user to continue after acknowledging the message.
Set one required date or a date range
For a single required date, choose equal to and provide the target date as the limit. You can type a recognizable date, such as 12/15/2026, but the meaning of a numeric date can depend on the computer’s regional settings. A less ambiguous option is to enter the date in a worksheet cell and refer to that cell in the validation rule.
For example, put the permitted date in H1, select the cells to validate, and set Allow to Date, Data to equal to, and the Date field to =$H$1. The dollar signs keep the reference fixed if the rule is applied to multiple cells. Format H1 as a date so people can see the intended value. The validation rule checks the value in H1; it does not make H1 itself uneditable.
For a range, select between and specify both endpoints. If the allowed period is January 1 through December 31, 2026, use those dates as the minimum and maximum. Referencing cells for the endpoints makes later changes easier: place the start date in H1 and the end date in H2, then use =$H$1 and =$H$2 in the corresponding limit fields. Keep both cells as genuine Excel dates, not text that only resembles a date.
Use a formula for more flexible rules
Choose Custom in the Allow list when the rule depends on another cell or needs logic beyond a simple date comparison. A custom validation formula must return TRUE for an allowed entry. For instance, with the first date entry in A2, a formula can require a date from January 1 through December 31, 2026. Select the cells beginning at A2, choose Custom, and enter:
=AND(ISNUMBER(A2),A2>=DATE(2026,1,1),A2<=DATE(2026,12,31))
The cell reference is relative: when the rule is applied down a column, Excel evaluates A3 for the next row, A4 for the one after that, and so on. The ISNUMBER check helps reject text that might otherwise look like a date. DATE constructs the limits in a way that avoids ambiguity from regional date formats.
To allow dates from today onward, a custom rule can use =AND(ISNUMBER(A2),A2>=TODAY()). TODAY updates as the workbook recalculates, so a date that was valid yesterday may become invalid later. This is useful for future appointment dates, but not for records that must remain acceptable after the date passes.
Choose the right date rule
- Equal to: Require one exact date, such as a scheduled inventory count.
- Between: Restrict entries to a fixed reporting period or booking window.
- Greater than or equal to: Allow a date from a start point onward, such as an effective date.
- Custom: Apply a moving limit, check another cell, or combine conditions.
Decide whether the date limits should stay fixed or move. A fixed date is appropriate for a closed reporting period. A rule based on TODAY() changes over time. If users should enter a date no earlier than today but no more than 90 days ahead, a custom formula can express both boundaries; remember that it will continue to move as the current date changes.
Input messages, alerts, and limitations
On the Input Message tab, add a short instruction such as “Enter a date between the start and end dates shown above.” Excel displays the message when a user selects a validated cell, helping explain the rule before an error occurs. On Error Alert, choose Stop when invalid dates must not be accepted through normal entry. A clear title and message make the warning more useful than Excel’s default wording.
Data validation is an entry aid, not a complete data-security measure. Copying and pasting data into a cell can replace its validation rule or put an invalid value in the cell, depending on the operation. Imported data, formulas, macros, and other editing methods can also create values that need checking. Protecting a worksheet can reduce accidental edits, but it does not turn validation into a guarantee that every stored value is valid. For important records, inspect the data periodically or use a separate check.
To inspect existing rules, select a cell and open Data > Data Validation. The dialog shows that cell’s settings. To find other rules on a sheet, use Home > Find & Select > Go To Special, choose Data Validation, and select All or Same, as appropriate. This can reveal cells whose validation was removed or differs from nearby cells.
Common problems and fixes
- The rule rejects a date that looks correct: The entry may be stored as text. Re-enter it using a date format Excel recognizes, or convert the source data to actual date values.
- The rule accepts an unexpected date: Check the computer’s regional date convention and the cell’s underlying value. A display format changes how a value appears, not what value it stores.
- The rule disappears after a paste: Paste operations can overwrite validation. Reapply the rule or use Paste Special options that preserve the needed cell setup, then check the affected cells.
- A formula works in the first row but not later rows: Check that the entry-cell reference is relative (for example, A2) and that limit-cell references are absolute (for example, $H$1).
- Users can continue despite an error: Confirm that the Error Alert style is Stop and that Show error alert is enabled.
Changing a cell’s number format to Date is not the same as adding validation. Formatting controls display; validation controls which entries Excel warns about or blocks during ordinary input. A cell can look like a date while containing text, and a date-formatted cell can still accept an out-of-range date unless a rule applies.
Frequently Asked Questions
Can Excel allow only one exact date?
Yes. Select the cells, open Data > Data Validation, choose Date, set the condition to equal to, and enter the permitted date or a reference to a cell containing it.
Can I allow only dates in the future?
Yes. Use a custom rule such as =AND(ISNUMBER(A2),A2>=TODAY()) for a range starting in A2. The TODAY() limit moves as the current date changes.
Does date formatting validate an entry?
No. Formatting changes how a value is displayed. Use Data Validation to set an allowed date or date range, and make sure entries are real Excel date values rather than text.
Why can someone paste an invalid date into a validated cell?
Validation is not a universal barrier against edits. Pasting may bypass the entry check or replace the rule. Review pasted data and confirm that validation remains applied to the intended cells.
Do these steps work in Excel for Mac or the web?
Excel for Mac also provides date rules through Data Validation, though ribbon layout and dialog details can vary by release. Excel for the web supports data validation, but some settings and editing options may differ from the Windows desktop app; check the available options in its Data tab.
Related
- Calculate Age in Excel for a Specific Date
- Data Validation Excel Shortcut and How to Use It
- Google Sheets 2D Data Validation: How to Set It Up
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Ordinal Number Format: Show 1st, 2nd, and 3rdExcel does not have a built-in number format that automatically changes a number to an ordinal such as…
- Microsoft Excel: How to Turn Off Flash FillTo turn off automatic Flash Fill in Microsoft Excel for Microsoft 365 on Windows, go to File >…
- Do All Merged Cells Need to Be the Same Size in Excel?No. In Excel, merged cells do not all have to be the same size: one merged area can…
- Excel Sum by Color: How to Total Cells by Fill ColorExcel for Microsoft 365 does not include a built-in SUMBYCOLOR formula. The simplest dependable method is to filter…
- How to Check Duplicate Entries in Excel with Easy MethodsTo check for duplicate entries in Excel, select the cells you want to check and choose Home >…
- Google Sheets Join Text in Cells: Formulas, Tips, and FixesYes. To join text from cells in Google Sheets, use the ampersand operator (&), or use functions such…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.