WRAPROWS
The WRAPROWS
function in Google Sheets is a versatile tool to wrap a provided row or column of cells into multiple rows based on a specified number of elements. This function is useful when you want to transform a single row or column into a multi-row array. Learn how to use the WRAPROWS
function effectively with our comprehensive guide.
Function Syntax and Parameters
Syntax: WRAPROWS(range, wrap_count, [pad_with])
Parameters:
range
: The range of cells that you want to wrap.wrap_count
: The number of elements after which to create a new row.pad_with
: [Optional] The value to fill empty cells with when the wrapping is uneven.
Step-by-Step Tutorial
-
Using
WRAPROWS
to wrap a row into multiple rows:- Example:
=WRAPROWS(A1:G1, 3)
- Result:
{{A1, B1, C1}, {D1, E1, F1}, {G1}}
- Example:
-
Using
WRAPROWS
to wrap a column into multiple rows:- Example:
=WRAPROWS(A1:A6, 2)
- Result:
{{A1, A2}, {A3, A4}, {A5, A6}}
- Example:
-
Using
WRAPROWS
with uneven wrapping:- Example:
=WRAPROWS(A1:F1, 4, "N/A")
- Result:
{{A1, B1, C1, D1}, {E1, F1, "N/A", "N/A"}}
- Example:
Use Cases and Scenarios
- Data Organization: Convert a single row or column of data into a multi-row array for better organization.
- Array Transformations: Create a new matrix by wrapping a range of cells based on a specific element count.
- Data Presentation: Format data into a more readable table-like structure by wrapping cells into multiple rows.
Related Functions
TRANSPOSE
: Transpose an array of cells from rows to columns and vice versa.SPLIT
: Split text into multiple cells based on a delimiter.