Checking Cell Value for a Date

B

Bishop

Is there a way I can check to see if a cell value has a date value... in any
format?
 
R

Rick Rothstein

Use VB's IsDate function. For example...

If IsDate(Range("A1").Value) Then
' A1 contains something VB can interpret as a date
Else
' The contents of A1 does not look like a date to VB
End If
 
G

Gary''s Student

Any cell with an integer value between 0 and 2958465 can, with proper
formatting, represent a date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top