Forum Discussion
paolopadovan
May 14, 2025Copper Contributor
textjoin
Hi. first of all sorry for my english I have a sheet with 365,000 rows. I need to concatenate the values in column D where the cells in columns A, B and C have the same values.
SergeiBaklan
May 15, 2025MVP
Perhaps with 365000 rows Power Query, as OliverScheurich suggested, will be better. However, formula
=GROUPBY (HSTACK(Tabelle1[Col1],Tabelle1[Col2],Tabelle1[Col3]),Tabelle1[Col4], ARRAYTOTEXT,0,0)
also works.
As for Power Query I'd add first colmns
let
Source = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content],
names = Table.ColumnNames( Source ),
DeclareType = Table.TransformColumnTypes( Source,
List.Transform( names, each {_ ,type text} ) ),
CombineTesxt = Table.Group(DeclareType, List.RemoveLastN(names, 1),
{{"Text", each Text.Combine( [Col4], ", "),
type text}})
in
CombineTesxt
Both variants are in attached file.
- paolopadovanMay 16, 2025Copper Contributor
Thank you
- Patrick2788May 15, 2025Silver Contributor
Interestingly, 64-bit Excel can handle the GROUPBY solution without issue for 360,000 rows at about .5 seconds. It's a bit faster without HSTACK (presuming columns are adjacent).
- SergeiBaklanMay 16, 2025MVP
Really intresting, thank you for sharing