Forum Discussion

HZ2506's avatar
HZ2506
Copper Contributor
Nov 11, 2022
Solved

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

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
  • HZ2506 

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

    An alternative could be this formula.

     

6 Replies

  • HZ2506 

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

    An alternative could be this formula.

     

    • HZ2506's avatar
      HZ2506
      Copper Contributor
      wow this formula work, thanks a lot, this really help.....
  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor
    What output do you expect from your given sample? Can you make a 4th column showing your desired result?

Resources