Sub Test()
Range("A:A").TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, FieldInfo:=Array(1, 3)
End Sub
Excel Workbook | ||||
---|---|---|---|---|
A | B | |||
1 | 010407 | 1/4/2007 | ||
Date |
i will be using it in code though.
Pgc01, this is new to me....=VALUE(TEXT(A1,"00\/00\/00"))
Hi Jon
The "\" inside the format string is an escape charater, it tells excel not to interpret the next character. Since "/" inside the format string has a special meaning, it's a date delimeter, if I would not use the "\/" it would mess up things up.
This way you get the string "01/04/06" out of the text function, that is then converted using the Value() function.
Remark: You could write the "/" between double quotes.
=TEXT(A1,"00-00-00")+0