Forum Discussion
milo1234
May 27, 2021Brass Contributor
Split text from cell with semicolon
I have a number of cells that contain two words which are separated by semicolons such as 1234;Release 6 5678;Release 7 Sometimes the words may be the other way round such as 1234;Release 6 R...
- May 27, 2021
If with legacy formulas
when
=IF(FIND("Release",B2)>FIND(";",B2), LEFT(B2,FIND(";",B2)-1), RIGHT(B2,LEN(B2)-FIND(";",B2))) and =IF(FIND("Release",B2)<FIND(";",B2), LEFT(B2,FIND(";",B2)-1), RIGHT(B2,LEN(B2)-FIND(";",B2)))
SergeiBaklan
May 27, 2021MVP
If with 365 something like
=LET(str,B2:B5,
sepPos,FIND(";",str),
relPos,FIND("Release",str),
IF({1,0},
IF(relPos>sepPos,
LEFT(str,sepPos-1),
RIGHT(str,LEN(str)-sepPos)),
IF(relPos<sepPos,
LEFT(str,sepPos-1),
RIGHT(str,LEN(str)-sepPos))
))