In this article, I will show you how to use data validation to reject invalid dates in Excel.
Join the channel Telegram of the AnonyViet 👉 Link 👈 |
How to reject invalid date in Excel
1. Select the area A2:A4.
2. On the Data tab, in the Data Tools group, click Data Validation.
Out of date range
3. Under Allow, click Date.
4. In the Data list, select between.
5. Enter Start date and End date as shown below and click OK.
Explanation: allow all dates from 5/20/2016 to today + 5 days. All dates outside this date range are rejected.
6. Enter May 19, 2016 in cell A2.
Result. Excel displays an error warning.
Note: to change the error message content, go to the Input Message and Error Alert tabs.
Sunday and Saturday
3. In the Allow list, click Custom.
4. In Formula, enter the formula shown below and click OK.
5. To double-check the formula, select cell A3 and click Data Validation.
6. Enter August 27, 2016 (Saturday) in cell A2.
Result. Excel displays an error warning.
Note: to change the error message content, go to the Input Message and Error Alert tabs.
In addition, you can also view many other excel articles here.