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