New Contributor

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 


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
That 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


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) ),
   "") )