Forum Discussion
dkent1982
Dec 02, 2022Copper Contributor
combine long list to fill a page at a time
I was given a long list provided with information containing three columns in order. I need to combine this list to where it stays in order but fill a page at a time. Below is a picture of what i hav...
Patrick2788
Dec 03, 2022Silver Contributor
This one may be more trouble than it's worth with a LAMBDA. I say this because the solution is not elegant. It's the ol' join/split/wrap approach. My sample is pulling 100 records before wrapping (I realize things go haywire if 110 is selected but I share this Lambda to give an idea of what it takes.). This task would be a lot easier if a matrix could be wrapped:
'HyperWrap
=LAMBDA(arr,records,LET(
w, ROWS(arr) * 3 / records,
joined, BYROW(arr, LAMBDA(row, TEXTJOIN("|", , row))),
bundled, TEXTJOIN("|", , WRAPCOLS(joined, records, "")),
split, TEXTSPLIT(bundled, , "|", , , ""),
WRAPROWS(split, w, "")
))
mtarler
Dec 04, 2022Silver Contributor
ah yes, in row 1 of my solution I converted the "in" range using EXPAND to make sure it is an even multiple of the N number of rows 🙂