Forum Discussion

gryzbert's avatar
gryzbert
Copper Contributor
Mar 30, 2023
Solved

Textsplit passed to unique

Hi, I am trying to find unique values from a list where entries can consist of multiple values that are separated by slashes. The Textsplit function splits but omisses text after the first separator. 

I want the output

a

b

 

List 

Sort/Unique/Textsplit for the array

= SORT( UNIQUE( TEXTSPLIT( D3:D4, "/",,TRUE,0)))

Textsplit for each row  
a aa  
a/b  ab 

 

How can I get there?

Thanks for your help.

 

  • gryzbert 

     

    Simplest option is to join the strings first, prior to splitting:

     

    =SORT(UNIQUE(TEXTSPLIT(TEXTJOIN("/", , D3:D4), , "/", TRUE, 0)))

     

    Regards

3 Replies

  • JosWoolley's avatar
    JosWoolley
    Iron Contributor

    gryzbert 

     

    Simplest option is to join the strings first, prior to splitting:

     

    =SORT(UNIQUE(TEXTSPLIT(TEXTJOIN("/", , D3:D4), , "/", TRUE, 0)))

     

    Regards

    • gryzbert's avatar
      gryzbert
      Copper Contributor
      Works like a charm! Thanks a lot! 🙂

Resources