I have Table A and Table B. On Table A I have a SKU column, a Fruit column, and a column where I want the formula to be at. On Table B I have a Fruit column, and a Price Range column.
on column C, I want a formula to get a TEXTJOIN with delimiter ", " (comma and a space) of Price Range (INDEX MATCH from column B) but without duplicates (unique values), one more thing is that I don't need every Fruit in column A to be taken, I only need Fruits that are just for the same SKU.
Because cell A5 contains "Apple" then "$$$" is one of the values I need, also A5 contains "Banana" then "$$" is the second value i need. Finally cell A5 contains "Pineapple" but because "$$$" is already was selected because of Apple then no need to add it again. "Coconut" is for another SKU (the SKU is "999999") therefore it doesn't need to be in the TEXTJOIN
any help will be much appreciated.
CodePudding user response:
You could use:
Formula in C5
:
=TEXTJOIN(",",,UNIQUE(FILTER(G$5:G$11,COUNTIFS(A$5:A$10,A5,B$5:B$10,F$5:F$11),"")))