Validating Date Format
This will work even if your dates are text strings, which formatting as a date will not correct.
Copy the code into a regular codemodule, and use it like
=CheckDate(A2,"mm/dd/yyyy")
Copy down to match your cells.
HTH,
Bernie
MS Excel MVP
Function CheckDate(myC As Range, myF As String) As Variant
CheckDate = (myC.Text = Format(myC.Value, myF))
End Function
"exceed_novice" wrote in message
...
Hi,
We receive a sheet with about 1000 rows and need to do some
validation
on that sheet before it gets processed. One of the validations is for
the column with the date.
I need to validate that the date is in the "mm/dd/yyyy" format. I
have
looked and tried different but have not been able to do this. Could
somebody tell me how to validate the date.
Thank You
|