ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reading the characters in a cell (https://www.excelbanter.com/excel-programming/420288-reading-characters-cell.html)

dstiefe

Reading the characters in a cell
 
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?


Mike

Reading the characters in a cell
 
I don't see a date in your examples

"dstiefe" wrote:

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?


Gary''s Student

Reading the characters in a cell
 
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
--
Gary''s Student - gsnu200814


"dstiefe" wrote:

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?



All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com