I have the following data in C4:D10 as input. Cell G4 has the formula =UNIQUE(C4:C10)
, Cell H4 has the formula =TEXTJOIN(", ",TRUE,IF($C$4:$C$10=G4,$D$4:$D$10,""))
, and Cell H5 has =TEXTJOIN(", ",TRUE,IF($C$4:$C$10=G5,$D$4:$D$10,""))
.
The values in H4 and H5 are what I need: they combine the texts for each category. However, I would prefer to write one array formula by TEXTJOIN
and over G4#
. I tried =TEXTJOIN(", ",TRUE,IF($C$4:$C$10=G4#,$D$4:$D$10,""))
, it did not work well.
Does anyone know how to write such one formula over G4#
to achieve the same values?
PS: formulas with LAMBDA and helper functions will still be appreciated if there is no other choice.