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...
OliverScheurich
Oct 29, 2023Gold Contributor
=LET(rng,A2:G13,HSTACK(UNIQUE(TAKE(rng,,2)),IF(DROP(REDUCE("",SEQUENCE(ROWS(UNIQUE(TAKE(rng,,2)))),LAMBDA(u,v,VSTACK(u,TOROW(DROP(REDUCE("",SEQUENCE(,5),LAMBDA(x,y,VSTACK(x,COUNTIFS(TAKE(rng,,1),INDEX(UNIQUE(TAKE(rng,,2)),v,1),TAKE(TAKE(rng,,2),,-1),INDEX(UNIQUE(TAKE(rng,,2)),v,2),INDEX(DROP(rng,,2),,y),"TRUE")))),1))))),1),"TRUE","FALSE")))
An alternative with Office 365 or Excel for the web could be this formula which spills the results.