Forum Discussion
Lopezr2307
Oct 06, 2021Copper Contributor
TEXTJOIN and IF and MATCH
So a little bit of background, I am using the TEXTJOIN and IF statement to pull multiple values from one tab and pull them into one cell on a tab. This works and the values are pulled in the problem is then the output has duplicate values that I want to filter out using the same formula. This is the formula I am using =TEXTJOIN(",",TRUE,IF('SC Data'!B2:$B$3856='Commodity Tracker'!A2,'SC Data'!$D$2:$D$3856,"")) This is the output
2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461,2D-05021461 |
The version of excel I am using does not support UNIQUE function unfortunately. I have seen people using the MATCH function but for some reason I just cant wrap my head around it. Thanks a ton!
3 Replies
Sort By
- SergeiBaklanDiamond Contributor
Please check this thread Removing duplicates when using TEXTJOIN - Microsoft Tech Community
- Lopezr2307Copper ContributorThat is the thread I have been following and the video that I was using, the problem is that it does not incorporate the lookup function as well.. I need to be able to perform the if a = b then give me c, then sort through all the c's and only return unique values
- SergeiBaklanDiamond Contributor
You may try
with array formula
=TEXTJOIN(", ", 1, IF( COUNTIF(A2,B2:B28)* ( MATCH(C2:C28,C2:C28,0) = (ROW(C2:C28)-ROW($C$1)) ), INDEX( C2:C28, ROW(C2:C28)-ROW($C$1) ), "") )