SOLVED

Extract multiple matching texts in separate in 2 columns (with multiple texts separate by comma)

Copper Contributor

Hi,

 

I have sample data as below, in the 3rd column would want to filter out all text that matching between 1st and 2nd column. Is there any formula function that can help to achieve this?

 

Appreciate everyone advise. TQ.

 

1st column2nd columnmatching
a,b,ca,c,za,c
c,z.dc,zc,z
d,e,ee,d,kd,e
b,a,ca,ba,b
a,b,ca,c,za,c
c,z.dc,zc,z
d,e,ee,d,kd,e
b,a,ca,ba,b
a,b,ca,c,za,c
c,z.dc,zc,z
d,e,ee,d,kd,e
b,a,ca,ba,b
6 Replies
What output do you expect from your given sample? Can you make a 4th column showing your desired result?
best response confirmed by HZ2506 (Copper Contributor)
Solution

@HZ2506 

=TEXTJOIN(",",,UNIQUE(FILTER(TRANSPOSE(TEXTSPLIT(B2,",")),TRANSPOSE(ISNUMBER(SEARCH(TEXTSPLIT(B2,","),A2))))))

An alternative could be this formula.

matching.JPG

 

@Harun24HRHi, column no. 3 is the desire output that i expect....thank you.

wow this formula work, thanks a lot, this really help.....

@HZ2506 Oh! That's okay. You may try below formula. Check the attached file.

=LET(x,TOCOL(TEXTSPLIT(A2,{",","."})),y,COUNTIFS(B2,"*"& x &"*"),z,FILTER(x,y),TEXTJOIN(",",TRUE,UNIQUE(z)))

Harun24HR_0-1668391973470.png

 

 

wow!, this formula also work, thanks a lot, really help.....
1 best response

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

@HZ2506 

=TEXTJOIN(",",,UNIQUE(FILTER(TRANSPOSE(TEXTSPLIT(B2,",")),TRANSPOSE(ISNUMBER(SEARCH(TEXTSPLIT(B2,","),A2))))))

An alternative could be this formula.

matching.JPG

 

View solution in original post