Forum Discussion
Split data in a single cell
How can I split data in a single cell when there isn't a clear data separation point? I need to separate the two lines into columns. The source data format cannot be changed. I cannot figure out a text to columns delimitator since number of characters in the name and the ID number vary.
FName LName: Custom Identifier/External Payroll ID/11111 FName LName: Custom Identifier/Personal Identification Number/9999999 |
I thought there were 2 cells.
Try Text to Columns with Delimited as type.
Tick the Other check box and press Ctrl+J in the box next to it. This is the code for a line break.
7 Replies
- Patrick2788Silver Contributor
Going off the provided string, you could use:
=TEXTSPLIT(A2,{":",": ","/"})
If there are more delimiters, a larger sample of strings might help us arrive at the best solution possible.
- WSokolCopper ContributorThank you, very close but this doesn't separate the end of the Payroll ID number from the 2nd FName
"11111FName LName: Custom Identifier"
This is the field when un-wrapped:
FName LName: Custom Identifier/External Payroll ID/11111FName LName: Custom Identifier/Personal Identification Number/9999999
With such a value in A2:
In B2: =LEFT(A2,FIND(" ",A2)-1)
In C2: =MID(A2,FIND(" ",A2)+1,FIND(":",A2)-FIND(" ",A2)-1)
In D2: =MID(A2,FIND(":",A2)+2,FIND("/",A2)-FIND(":",A2)-2)
In E2: =MID(A2,FIND("/",A2)+1,FIND("/",A2,FIND("/",A2)+1)-FIND("/",A2)-1)
In F2: =MID(A2,FIND("/",A2,FIND("/",A2)+1)+1,100)
Fill down
- WSokolCopper ContributorThank you, very close but this doesn't separate the end of the Payroll ID number from the 2nd FName
"11111FName LName: Custom Identifier"
This is the field when un-wrapped:
FName LName: Custom Identifier/External Payroll ID/11111FName LName: Custom Identifier/Personal Identification Number/9999999I thought there were 2 cells.
Try Text to Columns with Delimited as type.
Tick the Other check box and press Ctrl+J in the box next to it. This is the code for a line break.
- mathetesSilver ContributorIf there are spaces, those can be delimiters; if there's a colon, that can be a delimiter. Can you post a copy (after eliminating identifiable names) on OneDrive or GoogleDrive with a link here that grants access?