Reading the characters in a cell

  • Thread starter Thread starter dstiefe
  • Start date Start date
D

dstiefe

I have the name of a fund in the cell...for example:

American Century LIVESTRONG 2045 R
Fidelity Advisor Freedom 2035 A
Fidelity Advisor Freedom 2035 I
Fidelity Advisor Freedom 2040 I
Fidelity Freedom 2035
Fidelity Freedom 2040
Principal LifeTime 2030 Inst
Principal LifeTime 2030 R4

I need the date copies to another column
and i need all of the letters after the date copied into another column as
well

i have a list of over 600 lines...

any ideas?
 
Select the cells you want to parse and run:

Sub dateSpliter()
For Each r In Selection
s = Split(r.Value, " ")
For i = 0 To UBound(s)
If IsNumeric(s(i)) Then
r.Offset(0, 1).Value = s(i)
If i <> UBound(s) Then
r.Offset(0, 2).Value = s(i + 1)
End If
End If
Next
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top