Forum Discussion
marshalltj67
Nov 04, 2023Brass Contributor
Need to break up 1 cell into multiple columns (text has multiple conditions)
Need to break up 1 cell into multiple columns (text has multiple conditions) The source cell is as follows: Last, First, MI Rank USSF MAJCOM 123 SQUADRON/OFFICE Rank conditions are as follows: AB...
- Nov 06, 2023
See if the attached workbook does what you want. I used some helper columns.
HansVogelaar
Nov 04, 2023MVP
With such a value in A2:
In B2: =TRIM(LEFT(SUBSTITUTE(A2, " ", REPT(" ", 255)), 600))
In C2: =TRIM(MID(SUBSTITUTE(A2, " ", REPT(" ", 255)), 600, 255))
In D2: =TRIM(MID(SUBSTITUTE(A2, " ", REPT(" ", 255)), 1100, 1000))
marshalltj67
Nov 06, 2023Brass Contributor
Where do the values in the REPT function come from? I have some instances in the RANK column where "1st Lt" is outputting as "1st" and "Lt Col" outputting as "Lt". In addition, if the individual name is long it is outputting their middle initial.
Thanks for the help!
Thanks for the help!
- HansVogelaarNov 06, 2023MVP
Will every name have a middle initial?
And does a middle initial always have a point after it? For example
Lopez, Juan F.
- marshalltj67Nov 06, 2023Brass ContributorNot every name has a middle name but if they do it is in this format (w/o the point):
Lopez, Juan F- HansVogelaarNov 06, 2023MVP
See if the attached workbook does what you want. I used some helper columns.