Forum Discussion
Maybe an array formula to transpose records?
- Mar 26, 2024https://www.ablebits.com/office-addins-blog/textjoin-function-excel-merge-text-multiple-cells/#:~:text=The%20syntax%20of%20the%20TEXTJOIN,text%20value%20that%20you%20combine.
=TEXTJOIN(", ", TRUE, IF([Index]=[@Index], [Concat], ""))
=LET(ind,A2:A34,
conc,B2:B34,
HSTACK(UNIQUE(ind),IFNA(DROP(REDUCE("",UNIQUE(ind),LAMBDA(u,v,VSTACK(u,TOROW(FILTER(conc,ind=v))))),1),"")))
Does this return the intended result?
- Jpey65Mar 25, 2024Copper Contributor
OliverScheurich it does not work. It returns 0. As mentioned above the data is in a table, so I modified the formula:
=LET(ind,A2:A34,conc,B2:B34,HSTACK(UNIQUE(ind),IFNA(DROP(REDUCE("",UNIQUE(ind),LAMBDA(u,v,VSTACK(u,TOROW(FILTER(conc,ind=v))))),1),"")))
- OliverScheurichMar 25, 2024Gold Contributor
=LET(ind;Tabelle4[Index];
conc;Tabelle4[Concat];
HSTACK(UNIQUE(ind);IFNA(DROP(REDUCE("";UNIQUE(ind);LAMBDA(u;v;VSTACK(u;TOROW(FILTER(conc;ind=v)))));1);"")))If you have a dynamic table you can apply this formula. In my example the name of the table is Tabelle4. In your worksheet you have to replace Tabelle4 with the name of your table.
- Jpey65Mar 25, 2024Copper Contributor=LET(ind;Table1[Index];conc;Table1[Concat];HSTACK(UNIQUE(ind);IFNA(DROP(REDUCE("";UNIQUE(ind);LAMBDA(u;v;VSTACK(u;TOROW(FILTER(conc;ind=v)))));1);"")))
Returns an error:
The first argument of LET must be a valid name.