Forum Discussion
apei78759
May 25, 2022Copper Contributor
Manipulate text between delimiters
How can I covert following: 78756||23456||12345
To: 787||234||123
I want the first 3 digits
4 Replies
Sort By
- OliverScheurichGold Contributor
=LEFT(A1,3)&"||"&MID(A1,FIND("||",A1)+2,3)&"||"&MID(A1,FIND("||",A1,FIND("||",A1)+1)+2,3)
Maybe with this formula.
- apei78759Copper ContributorThank you! This works for string for 3 entries: 78756||23456||12345
But how about something that works regardless of the number of entries. For example, 5
78756||23456||12345||34567||09685- Detlef_LewinSilver Contributor
Try this.
=TEXTJOIN("||",TRUE,LEFT(FILTERXML("<y><z>"&SUBSTITUTE(A1,"||","</z><z>")&"</z></y>","//z"),3))