Category: FUNCTION | Updated: 2026-11-22

How to Use the WRAPROWS Function in Google Sheets | Wrap a Single Column of Data by a Specified Number of Columns

What Is the WRAPROWS Function?

The WRAPROWS function wraps 1D data arranged in a single column (or single row) horizontally after a specified number of items (columns), reshaping it into a 2D table (multiple rows × multiple columns). It performs the reverse operation of TOROW and TOCOL.

Syntax

=WRAPROWS(vector, wrap_count, [pad_with])
  • vector: The 1D (single-row or single-column) cell range or array to wrap.
  • wrap_count: A positive integer specifying the maximum number of elements (columns) per row.
  • pad_with: [Optional] The value to fill in if the last row has fewer elements than wrap_count (defaults to #N/A if omitted).

Example

Here is an example of wrapping a single-column list in A1:A5 every 3 columns into a table starting at cell C1, padding any remaining cells with "-".

Row Column A (Source Data) Formula in Column C Column C Column D Column E
1 Sato =WRAPROWS(A1:A5, 3, "-") Sato Suzuki Takahashi
2 Suzuki (Auto-spilled) Tanaka Ito -
3 Takahashi
4 Tanaka
5 Ito

Common Errors and Notes

  • #VALUE! Error: Passing a 2D range (such as 2 rows × 2 columns) as the first argument (vector), or specifying 0 or a negative number for the second argument (wrap_count), results in a #VALUE! error.
  • #N/A Errors: If the last row does not have enough items to fill the specified number of columns and you omit the third argument (pad_with), #N/A will appear. For a cleaner look, it is recommended to pass "" (an empty string) as the third argument.
  • #REF! Error: An error occurs if any cell in the spill range already contains a value.

Frequently Asked Questions

Q. What happens to the remaining cells if the number of items is not evenly divisible by the wrap count?

A. By default, #N/A errors are displayed, but you can fill them with any text—such as "" (an empty string) or "-"—by specifying the third argument, pad_with.

Q. Can I pass a 2D range with multiple rows and columns directly to WRAPROWS?

A. No, WRAPROWS is strictly for 1D data (a single row or a single column). If you want to wrap a 2D range, first convert it to 1D using TOCOL or TOROW before passing it in.