On 2002-09-18 14:13, PaddyD wrote:
2 options:
1) with a formula:
=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))
2) with a 'trick':
- highlight the column of text 'dates'
- go to Data | Text to columns
- click next twice
- select date & the YMD option from the drop down
- click finish
Recording these sets gives:<pre>
Sub dates()
'
' dates Macro
' Macro recorded 19/09/2002 by Paddy
'
'
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 5)
End Sub</pre>
which could be cleaned up a bit.
Paddy
This message was edited by PaddyD on 2002-09-18 14:20