SOLVED

Texjoin to remove duplicates

Copper Contributor

Hello, 

 

Attached file I'm having issues with.

 

I have a column with list of units that includes duplicates. Next to that column is a list of Ages with more duplicates. For example, for said unit 1203, I have in column A 17 rows with that same unit number. In column B, I have 16 rows showing age 39, and one row showing age 34. 

In column F, I have all the units where I removed duplicates. Next to it in column H actually, I am trying to use the textjoin to see the ages without any duplicates. In example above, I need to see 34,39.

 

Here is the formula I am using in H2.

 

=TEXTJOIN(",",TRUE,IF(($A$2:$A$683=$F2)*(MATCH($B$2:$B$683,$B$2:$B$683,0)=(ROW($B$2:$B$683)-ROW($B$1))),$B$2:$B$683,""))

 

Please help. File is attached. Thanks in advance.

 

@Haytham Amairah

@Sergei Baklan

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

@ztimothy 

If you have 365:

 

=TEXTJOIN(",",TRUE,SORT(UNIQUE(FILTER(B:B,A:A=F2)),1,1))

Thank you so very much @Patrick2788 

@ztimothy 

You're welcome. Have a great weekend!

1 best response

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

@ztimothy 

If you have 365:

 

=TEXTJOIN(",",TRUE,SORT(UNIQUE(FILTER(B:B,A:A=F2)),1,1))

View solution in original post