ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   date validation (https://www.excelbanter.com/excel-worksheet-functions/66691-date-validation.html)

Bri

date validation
 
Hi

Is there a way to easily validate dates in cells? (ie June 31, 2001 should
be rejected, for example)

I have cells formatted dd/mm/yyyy. If I enter, say jun 20, 2001, it shows
as 20/06/2001 as expected. BUT, if I accidently enter, say 31/06/2001,
Excel doesn't flag the error.

Is there a fix?
Bri




Ron Coderre

date validation
 
When you format a cell for dates, Excel only applies that format when the
cell value IS a date. Run this formula on the celll containing 31/06/2001:
(assuming it is in Cell A1): =ISNUMBER(A1) should return FALSE if it is not
a number (which dates are),

To restrict entries to dates, try this:
Select your input cells
DataValidation
Allow: Date
Then, set your date restrictions.

Entering 31/06/2001 should now engage a warning.


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Bri" wrote:

Hi

Is there a way to easily validate dates in cells? (ie June 31, 2001 should
be rejected, for example)

I have cells formatted dd/mm/yyyy. If I enter, say jun 20, 2001, it shows
as 20/06/2001 as expected. BUT, if I accidently enter, say 31/06/2001,
Excel doesn't flag the error.

Is there a fix?
Bri





JE McGimpsey

date validation
 
Check out Data/Validation. Choose Date from the Allow dropdown.

In article ,
"Bri" wrote:

Hi

Is there a way to easily validate dates in cells? (ie June 31, 2001 should
be rejected, for example)

I have cells formatted dd/mm/yyyy. If I enter, say jun 20, 2001, it shows
as 20/06/2001 as expected. BUT, if I accidently enter, say 31/06/2001,
Excel doesn't flag the error.

Is there a fix?
Bri


Bri

date validation
 
Thanks to both respondees!!
Bri




All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com