Forum Discussion
Wee001
Oct 29, 2023Copper Contributor
Question on Merging of rows
Hi, I have a sheet of over 5000 rows, and I'm looking to merge rows with a similar name, while combining the rows so that main row contains all the necessary information. Not really sure how to expla...
Patrick2788
Oct 30, 2023Silver Contributor
A 365 solution with the source data tabled:
=LET(
header, Table1[#Headers],
fullname, Table1[First Name] & " " & Table1[Last name],
names, SORT(UNIQUE(fullname)),
Consolidate, LAMBDA(a, v,
LET(
filtered, N(
FILTER(Table1[[Address]:[Supporting Docs]], fullname = v)
),
TF_array, BYCOL(
filtered,
LAMBDA(col, IF(SUM(col) >= 1, TRUE, FALSE))
),
splitname, TEXTSPLIT(v, " "),
VSTACK(a, HSTACK(splitname, TF_array))
)
),
REDUCE(header, names, Consolidate)
)