Hi Kim
You can use a function in Excel to determine if a cell is numeric but I do
not think you can determine if the figure is a date. You could use a
function like the one below and then test whether a date exists in, say,
cell A3 by using the formula =querydate(A3)
Function QueryDate(c As Range)
QueryDate = IsDate(c)
End Function
Alternatively, you could use code such as...
Sub Is_It_a_Date()
If IsDate(Range("A1")) Then
MsgBox "Its a date"
Else
MsgBox "Its not a date"
End If
End Sub
--
XL2002
Regards
William
(e-mail address removed)
| Is there a way to check if a cell contains a date. You can use ISTEXT for
| text but there does not seem to be one for date. Any ideas?
|
|