View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default If its a date, then...

As Tony explained, it depends on what you consider a date.
If you are happy to allow VBA to decide:
Public Function IsValueDate(argRange As Range) As Boolean
Dim tempDate As Date
On Error Resume Next
tempDate = argRange.Value
IsValueDate = (Err.Number = 0)
End Function

But you will see that this will produce some expected result.

NickHK

"Darin Kramer" wrote in message
...


HI Guys,

I need a formulae that says if cell a1 is a date, then put a Y, if not,
then put what is currently in a1....

Any ideas...?

Thanks.. :)

D

*** Sent via Developersdex http://www.developersdex.com ***