SOLVED

Textsplit passed to unique

Copper Contributor

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.

 

3 Replies
best response confirmed by gryzbert (Copper Contributor)
Solution

@gryzbert 

 

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

 

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

 

Regards

Works like a charm! Thanks a lot! :)

@gryzbert 

 

=SORT(UNIQUE(TEXTTEILEN(TEXTJOIN("/",TRUE,A1:A2),"/"),TRUE))

 

EDIT:  Not fast enough.

 

 

1 best response

Accepted Solutions
best response confirmed by gryzbert (Copper Contributor)
Solution

@gryzbert 

 

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

 

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

 

Regards

View solution in original post