Thread: TextDate ???
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default TextDate ???

I think this macro will do what you want (just change the sheet name and
cell range in the For Each statement to match your actual conditions)...

Sub MakeNearDatesRealDates()
Dim C As Range
For Each C In Worksheets("Sheet1").Range("C:C")
If TypeName(C.Value) < "Date" Then
If IsDate(C.Value) Then C.Value = CDate(C.Value)
End If
Next
End Sub

--
Rick (MVP - Excel)


"silentpro" wrote in message
...
I have a workbook that has multiple sheets & each one has a date field.
Someone entered the dates in a non xl date format

Example: January 6 2009

I tried formatting the whole column to show d/m/yy but the text example
above doesn't format.

Is there a macro or something that I can run to convert these text dates
to an actual date format?


Thanks