Forum Discussion
How to wrap table, not vector (WRAPCOLS for tables)
- 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
A practical spreadsheet-only route is to add an Index column to the source table, then derive two helper values: `Block=QUOTIENT(Index-1,RowsPerBlock)+1` and `RowInBlock=MOD(Index-1,RowsPerBlock)+1`. Use Block to place each group on a separate print area or sheet, and keep RowInBlock for sorting. This preserves each five-column record intact, avoids turning the table into a one-dimensional vector, and is easier to audit than a single long spill formula.