WRAPCOLS function

WRAPCOLS reformats a single row or column of values into a multi-column array, useful for creating balanced layouts from long lists.

=WRAPCOLS(vector, wrap_count, [pad_with])

Generate a WRAPCOLS formula

Describe what you need. The generator will reach for WRAPCOLS where WRAPCOLS is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How WRAPCOLS reads its arguments
vectorrequiredwrap_countrequiredpad_withoptionalWRAPCOLS
ArgumentRequiredDescription
vectorRequiredA 1D array (single row or column) of values to wrap. If empty, returns an empty array.
wrap_countRequiredA positive integer specifying how many columns the result should have. Must be ≥ 1; if 0, negative, or non-numeric, returns #VALUE! error.
pad_withOptionalOptional. The value to insert into empty cells when the vector length is not evenly divisible by wrap_count. If omitted, empty cells remain blank.

Returns

A 2D array with wrap_count columns, containing as many rows as needed to fit all values from the vector.

Availability

Excel: 365 · Google Sheets: Not available

Worked examples

1. Display task names in a 3-column layout

TaskOwnerStartDueHours
Design homepageAlice9/1/20259/5/20258
Write docsBob9/2/20259/6/202516
Code reviewCharlie9/3/20259/7/202512
Deploy to prodAlice9/4/20259/8/202520
Bug fixesBob9/5/20259/9/202510
TestingCharlie9/6/20259/10/202514
Security auditAlice9/7/20259/11/202518
=WRAPCOLS(A2:A8, 3)

Result: Design homepageCode reviewBug fixesWrite docsDeploy to prodTestingSecurity audit

WRAPCOLS takes 7 task names from A2:A8 and arranges them into 3 columns, creating 3 rows. Tasks are placed left-to-right, top-to-bottom: row 1 gets tasks 1, 3, 5; row 2 gets tasks 2, 4, 6; row 3 gets task 7 with two empty cells following. This layout is ideal for printing task lists in compact, newspaper-style columns.

2. Arrange hours logged into pairs

TaskOwnerStartDueHours
Design homepageAlice9/1/20259/5/20258
Write docsBob9/2/20259/6/202516
Code reviewCharlie9/3/20259/7/202512
Deploy to prodAlice9/4/20259/8/202520
Bug fixesBob9/5/20259/9/202510
TestingCharlie9/6/20259/10/202514
Security auditAlice9/7/20259/11/202518
=WRAPCOLS(E2:E8, 2)

Result: 8161220101418

The hours column (E2:E8) contains 7 values. Wrapping into 2 columns creates 4 rows, with the last row's second cell left empty. Consecutive hours are paired side-by-side, making time comparisons easier and creating a compact report suitable for dashboards or time-tracking summaries.

3. Create an owner roster with padding

TaskOwnerStartDueHours
Design homepageAlice9/1/20259/5/20258
Write docsBob9/2/20259/6/202516
Code reviewCharlie9/3/20259/7/202512
Deploy to prodAlice9/4/20259/8/202520
Bug fixesBob9/5/20259/9/202510
TestingCharlie9/6/20259/10/202514
Security auditAlice9/7/20259/11/202518
=WRAPCOLS(B2:B8, 2, "Unassigned")

Result: AliceBobCharlieAliceBobCharlieAliceUnassigned

This wraps 7 owner names from B2:B8 into 2 columns. Since 7 is odd, the final row would have an empty second cell; WRAPCOLS fills it with "Unassigned" via the pad_with parameter, creating a perfectly balanced rectangular roster. This ensures team schedule layouts remain visually aligned even with uneven counts.

Common errors

Which WRAPCOLS error are you seeing?
WRAPCOLS returned an error#VALUE!
Ensure wrap_count is a number ≥ 1. Use =WRAPCOLS(A2:A8, 3) instead of =WRAPCOLS(A2:A8, "3") or =WRAPCOLS(A2:A8, 0).
#SPILL!
Place the formula in a location with sufficient empty space, or clear conflicting data first. Move to a blank area to the right or below existing data.
#NUM!
Reduce wrap_count to a reasonable value relative to your vector size. For a 5-item list, use wrap_count between 1 and 5.
ErrorWhy it happensHow to fix it
#VALUE!wrap_count is not a positive integer (e.g., 0, -1, or text like "three").Ensure wrap_count is a number ≥ 1. Use =WRAPCOLS(A2:A8, 3) instead of =WRAPCOLS(A2:A8, "3") or =WRAPCOLS(A2:A8, 0).
#SPILL!The result array would overflow into cells that already contain data or formulas, and the spreadsheet cannot spill over them.Place the formula in a location with sufficient empty space, or clear conflicting data first. Move to a blank area to the right or below existing data.
#NUM!wrap_count is too large or creates an invalid array dimension (e.g., wrapping a 5-item list into 10 columns).Reduce wrap_count to a reasonable value relative to your vector size. For a 5-item list, use wrap_count between 1 and 5.

Tips and when to use something else

  • WRAPCOLS is ideal for reformatting single-column or single-row data into balanced multi-column layouts for printing or dashboard display. Use it when readability and compact layout matter more than preserving sort order.
  • If your vector length is not evenly divisible by wrap_count, the result will have empty cells in the final row. Use the optional pad_with parameter to fill these with a placeholder like empty string (""), "N/A", or "—" for visual consistency.
  • For the reverse operation—converting a multi-column layout back into rows—use WRAPROWS instead. WRAPCOLS flows left-to-right, top-to-bottom; WRAPROWS flows top-to-bottom, left-to-right.
  • If you only need to reorient data without wrapping (simple 90° rotation), use TRANSPOSE. For converting single columns to rows or vice versa without wrapping, use TOROW or TOCOL instead.

Frequently asked questions

What's the difference between WRAPCOLS and WRAPROWS?
WRAPCOLS wraps data into multiple columns (reading left-to-right, top-to-bottom). WRAPROWS wraps into multiple rows (reading top-to-bottom, left-to-right). Choose WRAPCOLS for side-by-side layouts like task lists or rosters; choose WRAPROWS for stacked layouts.
What happens if my vector length doesn't divide evenly by wrap_count?
The final row will have empty cells. Without pad_with, they remain blank and may appear inconsistent. Specify pad_with (like "" or "Unassigned") to fill those cells with a placeholder, creating a perfectly rectangular result.
Can I wrap multiple columns from a dataset at once?
WRAPCOLS works on one 1D vector at a time. For multiple columns, create separate WRAPCOLS formulas for each column, then combine results using HSTACK or VSTACK to arrange them side-by-side or stacked.
How do I flatten or unwrap data that's already arranged in columns?
Use TOCOL to convert a 2D range into a single column vector. Alternatively, use BYROW or BYCOL with a custom function to flatten multi-column data into a linear list for processing or storage.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17