In spite of this never ending and unavailing discussion, perhaps something positive should be sometime contributed.
Obviously many chemists are frustrated by wrongly copied CAS number lists. Because of the lists are adopted frequently from HTML format (for example
http://www.chemnet.com/dict/cas/en130.html)
there are scarce methods for correct transferring into .xls(x). For this purpose, I tried to develop macro, and have published lately in this thread, unfortunately with severe mistake. Here
is a correct version.
Option Explicit
Sub Date2CAS()
'Sub corrects wrongly converted CAS ID's from date to string format
Dim S As Variant, T As Variant, D1 As Variant, D2 As Variant
Dim MB As Long
Dim F As String
Dim Hyphen As Boolean, MonthLeading As Boolean
Dim Cell As Range
Set S = Selection
If S.Count = 1 Then
MB = MsgBox("- downward list from here (Yes)" & vbCrLf & _
" (can't be undone)" & vbCrLf & _
"- only this single cell (No)", _
vbYesNoCancel + vbDefaultButton2, _
"Fix wrong dates into correct CAS numbers")
If MB = vbCancel Then Exit Sub
If MB = vbYes Then
Set S = Range(S, S.End(xlDown))
End If
End If
Application.ScreenUpdating = False
For Each Cell In S
F = Cell.NumberFormat
Cell.NumberFormat = "@"
Hyphen = InStr(1, Cell, "-") > 0
If Not Hyphen Then
T = Cell.Value
If IsNull(MonthLeading) Then _
MonthLeading = InStr(F, "m") < InStr(F, "d")
If Not MonthLeading Then
D1 = Day(T): D2 = Month(T)
Else
D2 = Day(T): D1 = Month(T)
End If
Cell.Value = Year(T) & "-" & Format(D2, "00") & "-" & D1
End If
Next Cell
Application.ScreenUpdating = True
End Sub
The example is based on the above cited hypertext.

For I have tested it only in Middle European date format, I would be grateful to anybody who would try English one and tell.
Regards
PB