Forum Discussion
Zdenek_Moravec
Jan 21, 2024Iron Contributor
How to wrap table, not vector (WRAPCOLS for tables)
Dear colleagues I have a long table of 5 columns and maybe 200 rows. The task is to wrap the table after a specified number of rows to see the table in landscape on a new sheet. I was thinking abo...
- Jul 17, 2026
My approach is to leave the table as a 2D array and pull out what's needed in blocks.
=WrapRows2Dλ(DROP(Snapλ(T_Data,"Biology"),,1),4,"")Snapλ is a convenience Lambda for quick filtering without having to supply a Boolean vector.
WrapRows2Dλ has three arguments - array, new_height (4 for this example), and an optional pad_width (empty string here).
WrapRows2Dλ / WrapCols2Dλ: Fast, efficient 2D wrapping without flattening | Microsoft Community Hub
PeterBartholomew1
Jul 20, 2026Silver Contributor
Nested blocks are good, but with the relevant headers PIVOTBY should return an acceptable result.
Worksheet formula
= PIVOTBY(questions, subject, answers, CONCAT,3,0,,0)
where
answers =T_Data[[#All],[Answer1]:[Answer4]]
Note1: The names include the header row as shown for 'answers'
Note2: The PIVOTBY function did not exist when the question was originally posted.