SOLVED

TEXTJOIN formula to search for value with multiple results

Copper Contributor

Hello all,

 

I'm trying to apply the TEXTJOIN formula to search for a value and get multiple results.

 

My data looks like this:

 

 ABCDEF
1Column1Column2Column3 UniqueValues
21AA1 A..
32AA2 B...
43AA3   
54BB1   
65BB2   

 

What I want, is to look for the unique values in column2 (e.g. A) and then print all the matching values from column3 (e.g. A1, A2 and A3), in one cell or in different columns.

 

I tried the following formula (Excel 2019) but it gives me an error on the = sign:

=TEXTJOIN(",";TRUE;IF(E2=B:B,C:C,""))

 

Does someone know what I'm missing here?

 

Thanks!

Laura

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

@Laura1608 

You separate the arguments inconsistently - a mixture of commas and semicolons.

Do you use point as decimal separator? If so:

 

=TEXTJOIN(",",TRUE,IF(E2=B:B,C:C,""))

 

But if you use comma as decimal separator:

 

=TEXTJOIN(",";TRUE;IF(E2=B:B;C:C;""))

@Laura1608 

If you have Microsoft 365 or Office 2021, you can also use

 

=TEXTJOIN(",",TRUE,FILTER(C:C,B:B=E2))

 

or

 

=TEXTJOIN(",";TRUE;FILTER(C:C;B:B=E2))

 

depending on your decimal separator.

 

@Hans VogelaarThanks, that helped!

And for other readers: don't forget to presss CTRL+SHIFT+ENTER afterwards, or it won't work.

1 best response

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

@Laura1608 

You separate the arguments inconsistently - a mixture of commas and semicolons.

Do you use point as decimal separator? If so:

 

=TEXTJOIN(",",TRUE,IF(E2=B:B,C:C,""))

 

But if you use comma as decimal separator:

 

=TEXTJOIN(",";TRUE;IF(E2=B:B;C:C;""))

View solution in original post