Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to Sort by Color in Excel
  • Subtotal function in Excel
  • Remove Duplicates Example in Excel
  • Conditional Formatting New Rule with Formulas in Excel
  • How to combine 2 or more chart types in a single chart in Excel

References

  • Count unique text values with criteria
  • How to retrieve first match between two ranges in Excel
  • Extract all partial matches in Excel
  • How to use Excel MMULT Function
  • How to get address of first cell in range in Excel

Data Validations

  • Excel Data validation don’t exceed total
  • How To Create Drop-down List in Excel
  • Excel Data validation allow uppercase only
  • Excel Data validation allow weekday only
  • Excel Data validation whole percentage only

Reject Invalid Dates in Excel

by

How to reject dates Outside a Date Range or  outside Sundays and Saturdays in Excel?

This example teaches you how to use data validation to reject invalid dates.

1. Select the range A2:A4.

2. On the Data tab, in the Data Tools group, click Data Validation.

Outside a Date Range

3. In the Allow list, click Date.

4. In the Data list, click between.

5. Enter the Start date and End date shown below and click OK.

Explanation: all dates between 5/20/2016 and today’s date + 5 days are allowed. All dates outside this date range are rejected.

6. Enter the date 5/19/2016 into cell A2.

Result. Excel shows an error alert.

Note: to enter an input message and error alert message, go to the Input Message and Error Alert tab.

Sundays and Saturdays

3. In the Allow list, click Custom.

4. In the Formula box, enter the formula shown below and click OK.

Explanation: the WEEKDAY function returns a number from 1 (Sunday) to 7 (Saturday) representing the day of the week of a date. If a date’s weekday is not equal to 1 (Sunday) AND not equal to 7 (Saturday), the date is allowed (<> means not equal to). In other words, Mondays, Tuesdays, Wednesdays, Thursdays and Fridays are allowed. Sundays and Saturdays are rejected. Because we selected the range A2:A4 before we clicked on Data Validation, Excel automatically copies the formula to the other cells.

5. To check this, select cell A3 and click Data Validation.

As you can see, this cell also contains the correct formula.

6. Enter the date 8/27/2016 (Saturday) into cell A2.

Result. Excel shows an error alert.

Note: to enter an input message and error alert message, go to the Input Message and Error Alert tab.

Post navigation

Previous Post:

VLOOKUP without #N/A error in Excel

Next Post:

Manipulating text strings using Left, Mid, Right, Len, Substitute in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF with wildcards in Excel
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • How to use IFS function in Excel

Date Time

  • Convert text timestamp into time in Excel
  • Convert Excel time to decimal minutes
  • How to enter Today’s Date or Static Date and Time in Excel
  • Get first day of previous month in Excel
  • How to calculate months between dates in Excel

Grouping

  • Group arbitrary text values in Excel
  • If cell contains one of many things in Excel
  • Group numbers with VLOOKUP in Excel
  • Group times into unequal buckets in Excel
  • How to randomly assign people to groups in Excel

General

  • Automatically fill series of cells in Excel using AutoFill
  • Count cells less than in Excel
  • Freeze and Unfreeze Panes in Excel
  • Find Most Frequently Occurring Word in Excel Worksheet
  • How to get original number from percent change in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning