How to check if cell value is a valid date

There is no built-in function in excel to check the value of the cell is a valid date. In order to do this you have to make your own function.

Follow the steps below.

1. Open the VBA Script Editor of your excel.  Select Tools->Macro->Visual Basic Editor or Press Alt+F11 on the keyboard

vba

2. The Visual Basic Editor window will appear, then Select Insert->Module on the menu.

vba-insert-module

3. Copy and Paste the script below.

Function IsDateValid(cell) As Boolean
If IsDate(cell) Then
IsDateValid = True
Else
IsDateValid = False
End If
End Function

4. Save the module. And thats it your done!

To use the created function  IsDateValid, the figure

vba-validate-date

,

  1. No comments yet.
(will not be published)
Submit Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Subscribe to comments feed
  1. No trackbacks yet.

SetPageWidth