Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default TextDate ???

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default TextDate ???

Perfect, thank you very much!!!!


"Rick Rothstein" wrote in message
...
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date format to Text Date for use in Mail Merge Erinayn Excel Discussion (Misc queries) 3 April 22nd 10 06:04 AM
Formula concatenating date & text converts date to number Wekiva Excel Programming 2 April 7th 09 08:28 PM
how do i convert text to date (mm/yy text to mm/dd/yyyy date)? lindsey Excel Discussion (Misc queries) 1 July 27th 07 10:05 PM
VBA convert day and date from text string to Excel date Max Bialystock[_2_] Excel Programming 5 May 14th 07 04:54 AM
Concatenating a Text and a Date without losing orginal Date Format Hi_no_Tori Excel Discussion (Misc queries) 5 September 17th 06 06:35 PM


All times are GMT +1. The time now is 04:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"