WRAPCOLS Function
The WRAPCOLS
function in Google Sheets wraps a range into multiple columns based on a specified wrap count.
Syntax
WRAPCOLS(range, wrap_count, [pad_with])
range
: The range to wrap.wrap_count
: The number of elements per column.pad_with
(optional): Value to use for padding if necessary.
Examples
- Basic Wrapping
Wrap the range A1:A9 into columns with 3 elements each:
=WRAPCOLS(A1:A9, 3)
- Wrapping with Padding
Wrap the range and pad with zeros if needed:
=WRAPCOLS(A1:A9, 3, 0)
Notes
- Useful for organizing data in a more readable format when dealing with large datasets.
Related Functions
- WRAPROWS: Wrap a range into multiple rows.
- ARRAY_CONSTRAIN: Limit the number of rows and columns in an array.