How to concatenate strings found in a range of cells

Hi

I want to search for specific rows thay match a specific column (A) text and then concatenate al the found rows column (B) strings in a specific cell (text).

So in Tab1

no - date - Fruit - Amount - Quality
1 - april 1 - Bananas - 200 - Green
2 - april 2 - Bananas - 300 - Ripe
3 - april 2 - Apples - 400 - Good
4 - april 2 - Pears - 100 - Good
5 - april 3 - Bananas - 50 - Ripe
6 - april 3 - Apples - 50 - Bad

Tab 2

1 - Appels - (concatenate Quality from all rows from Tab 1 with Apples, looks like “Good, Bad”)
2 - Bananas - (concatenate Quality from all rows from Tab 1 with Bananas, looks like “Green, Ripe, Ripe”)
3 - Pears

So how can I do that?

Thanks a lot Schiavinatto, it works, I could also skip the work table. Using all the cells from the first table. =PROCVMULTIPLO(C2;$C$2:$C$7;$E$2:$E$7)

Hallo

=TEXTJOIN(", ";1;IF($C$2:$C$7=C2;$E$2:$E$7;""))

#edit: Arguments seperated by ;

as Array-Formula per ctrl shift enter
and hold ctrl-key while pulling down

1 Like

Thanks but It doesn’t seem to work. Gives Error 501.

Curly quotes instead of simple quotes?
apples bananas pears.ods (12.5 KB)

sorry … wrong Argumentseperators, use

=TEXTJOIN(", " ; 1 ; IF($C$2:$C$7=C2 ; $E$2:$E$7 ; "" ))
1 Like

With commas it gives Error:508: Error: in bracketing
EDIT: that is because the separator for functions in my configuration is set to semicolon, not comma.

1 Like

louisbanens_ask_en_104565.ods (15,3,KB)

1 Like