It is worse than that... not only are they different lengths, but their construction is different... years or no years, day of week or no day of week, period after the month or no period after the month, etc.Hi Alley, the text string will not always be the same length, I have provided a few more examples below in response to XOR LX's request.
These should have been in your first message as your original example was not representative of what you have now posted.Hi, few more examples,
"Thu, Feb 16GGHL, FGJK, LIM2 Comments"
"Feb 2, 2018FGH, IJK, LK9 comments"
In every case, I need the date section extracted and the upper case symbols in the middle. I need the date and the symbols in two seperate cells.
Function GetDate(S As String) As String
Dim X As Long
For X = 1 To Len(S) - 1
If Mid(S, X, 2) Like "#[A-Z]" Then
GetDate = Left(S, X)
Exit For
End If
Next
End Function
Function GetLetters(S As String) As String
Dim X As Long
For X = 1 To Len(S) - 1
If Mid(S, X, 2) Like "[A-Z][A-Z]" Then
GetLetters = Mid(S, X)
Exit For
End If
Next
For X = 1 To Len(GetLetters) - 1
If Mid(GetLetters, X, 2) Like "[A-Z][!A-Z ,]" Then
GetLetters = Left(GetLetters, X)
Exit For
End If
Next
End Function