Forum Discussion

manhuy's avatar
manhuy
Copper Contributor
Mar 14, 2023
Solved

Extract text from Comma Separated Cell to another Comma Separated Cell

Hi Community,

 

I was wondering if anyone could help me with this problem. 

Any method to achieve "Desired Outcome" column would be appreciated.

DataDesired Outcome
BAR-Barcelona (1), RM-Real Madrid (2), MU-Manchester Utd (3), CHE-Chelsea (4), LIV-Liverpool (5)BAR, RM, MU, CHE, LIV
BAR-Barcelona (1), RM-Real Madrid (2)BAR, RM
MU-Manchester Utd (3), LIV-Liverpool (5)MU, LIV
BAR-Barcelona (1)BAR

 

Many thanks

  • manhuy 

     

    =LET(
        ζ, TEXTSPLIT(A1, "-", " "),
        TEXTJOIN(", ", , FILTER(TAKE(ζ, , 1), 1 - ISNA(TAKE(ζ, , -1))))
    )

     

5 Replies

Resources