Excel WRAPCOLS Function: Turn Long Lists into Multi‑Column Layouts
The WRAPCOLS function transforms one-dimensional arrays – long vertical columns or horizontal rows – into two-dimensional grids by wrapping values down columns. Whether you’re creating multi-column product listings, building dashboard layouts, or reformatting import data, WRAPCOLS restructures linear lists into clean, vertical layouts with a single formula.
What Does the WRAPCOLS Function Do?
WRAPCOLS takes a single-dimension array and reshapes it into a two-dimensional structure by wrapping values down columns at a specified count. Unlike WRAPROWS which flows left-to-right, WRAPCOLS flows top-to-bottom within each column, moving left-to-right to additional columns as needed. This orientation is ideal for creating vertically-organized layouts, multi-column selection panels, and data visualizations that prioritize vertical scanning.
The power of WRAPCOLS lies in its complementary approach to WRAPROWS. While WRAPROWS creates horizontal layouts, WRAPCOLS creates vertical multi-column layouts – allowing you to choose the most appropriate presentation for your data and audience.
WRAPCOLS Syntax and Arguments
=WRAPCOLS(vector, wrap_count, [pad_with])
- vector (required): The one-dimensional array or range to reshape. This can be a vertical column (like A2:A100) or horizontal row (like B2:K2). WRAPCOLS works with either orientation and flows top-to-bottom regardless.
- wrap_count (required): The maximum number of values to display in each output column. Once this count is reached, WRAPCOLS automatically starts a new column to the right.
- pad_with (optional): The value used to fill empty cells in the last column if the data count is not a perfect multiple of the wrap count. If omitted, Excel defaults to filling with
#N/Aerrors.
Key Rules:
- Vector must be one-dimensional (either 1xN or Nx1 layout).
- Wrap_count must be greater than or equal to 1.
- Data flows top-to-bottom within each column, then continues in the next column to the right.
- The resulting array spills automatically; ensure adequate empty space to the right and below.
Key Behaviors and Important Notes
- Spill behavior: WRAPCOLS is a dynamic array function that automatically spills across multiple cells. If cells are occupied, you get
#SPILL!error. - Column-wise wrapping: Values flow from top to bottom within each column. Once wrap_count is reached, a new column begins to the right.
- #N/A padding: When data doesn’t perfectly fill the last column, empty cells default to
#N/Aunless you specify a custom pad_with value. - Single dimension required: If your input is two-dimensional, WRAPCOLS returns
#VALUE!error. Use TOCOL or TOROW first to flatten. - Invalid wrap count: If wrap_count is less than 1, Excel returns
#NUM!error. - Output dimensions: Total columns = CEILING(array_length / wrap_count); Total rows = wrap_count or fewer in the last column.
- Live updates: If your source array grows or shrinks, WRAPCOLS automatically adjusts the grid dimensions.
Basic Examples
Example 1: Simple vertical list to multi-column grid
You have a vertical list of 12 product names in A2:A13. To convert this into 3 columns with 4 items each, flowing down first:
=WRAPCOLS(A2:A13, 4)
Result: A 4×3 grid where data flows top-to-bottom in each column. Column 1 has items 1-4, column 2 has items 5-8, column 3 has items 9-12.
Example 2: Wrapping with custom padding
You have 11 items but want 4 per column (11 ÷ 4 = 2 full columns + 1 item in column 3):
=WRAPCOLS(A2:A12, 4, "-")
Result: Column 1 has 4 items, column 2 has 4 items, column 3 has 1 item followed by three dashes for a clean appearance.
Example 3: Horizontal to multi-column conversion
Source data is horizontal in B2:J2 (8 values):
=WRAPCOLS(B2:J2, 3)
Result: A 3-row × 3-column grid with values flowing top-to-bottom. The last cell shows #N/A.
Example 4: Replacing #N/A with blank cells
To create cleaner output for reports or dashboards:
=WRAPCOLS(A2:A12, 4, "")
Empty padding cells display as blank instead of error values.
Example 5: Dynamic wrapping with sorted data
=WRAPCOLS(SORT(A2:A20), 6)
Sorts the list alphabetically first, then wraps into columns of 6 items each, flowing downward.
Understanding WRAPROWS vs. WRAPCOLS Flow
The critical difference between these functions is the direction of data flow:
| Aspect | WRAPROWS | WRAPCOLS |
|---|---|---|
| Data Flow | Left-to-right horizontally, then new row | Top-to-bottom vertically, then new column |
| Count Argument | Values per row (number of columns) | Values per column (number of rows) |
| Use Case | Horizontal browsing catalogs, product grids | Vertical selection panels, columnar reports |
| Example Input | 20 items with wrap_count=5 | 20 items with wrap_count=5 |
| Output Structure | 4 rows × 5 columns | 5 rows × 4 columns |
Visual comparison: If you have 12 items and wrap_count=4:
- WRAPROWS: Creates 3 rows × 4 columns (left-to-right reading)
- WRAPCOLS: Creates 4 rows × 3 columns (top-to-bottom reading)
Creating Professional Multi-Column Layouts
Multi-Column Product Catalog
Display products in a vertical list format optimized for scrolling:
=VSTACK(
{"Product Catalog"},
WRAPCOLS(FILTER(Inventory!A:A, Inventory!A:A <> ""), 5, "")
)
Creates a title row followed by products arranged into 5-item columns, flowing downward. Perfect for digital catalogs or mobile-friendly layouts.
Dashboard Selection Panel
Create a compact vertical selection menu:
=WRAPCOLS(
UNIQUE(FILTER(Categories!A:A, Categories!A:A <> "")),
8,
""
)
Displays unique categories in columns with 8 items per column, maximizing vertical space efficiency.
Employee Directory Grid
Arrange names in a compact vertical multi-column layout:
=VSTACK(
{"Employee Directory"},
WRAPCOLS(SORT(HR!A:A), 10, "")
)
Sorts employees alphabetically, then displays them in columns of 10 names each, ideal for bulletin board printing.
Survey Options Grid
Display survey choices in a multi-column selection interface:
=WRAPCOLS(
Survey_Questions,
6,
""
)
Arranges 6 options per column for easy vertical scanning and selection.
Inventory Check-Off Sheet
Create a printable multi-column inventory list:
=HSTACK(
WRAPCOLS(SORT(Inventory[Item Name]), 15, ""),
WRAPCOLS("☐", 15, "")
)
Creates columns of items with checkboxes for manual inventory verification.
Advanced Function Combinations
WRAPCOLS + TOCOL for complex reshaping
=WRAPCOLS(
TOCOL(HSTACK(Column_A, Column_B, Column_C)),
8,
""
)
Combines multiple columns horizontally, flattens to single column with TOCOL, then wraps into columns of 8 items each.
WRAPCOLS + UNIQUE + FILTER
=WRAPCOLS(
UNIQUE(FILTER(A:A, A:A <> "")),
6,
""
)
Removes duplicates and blanks from the source, then wraps unique values into a 6-item-per-column grid.
WRAPCOLS + SORT + FILTER
=WRAPCOLS(
SORT(FILTER(Products!A:A, Products!B:B > 100), 1, 1),
5,
""
)
Filters products by quantity, sorts alphabetically, then displays in columns of 5 items each.
WRAPCOLS + SEQUENCE for number matrices
=WRAPCOLS(
SEQUENCE(20),
4,
""
)
Generates numbers 1-20 and arranges them in columns of 4 items each (5 rows × 4 columns).
Nested WRAPCOLS with multi-source consolidation
=WRAPCOLS(
SORT(
UNIQUE(
FILTER(
VSTACK(Source1!A:A, Source2!A:A, Source3!A:A),
VSTACK(Source1!A:A, Source2!A:A, Source3!A:A) <> ""
)
)
),
7,
""
)
Consolidates data from three sources, removes duplicates and blanks, sorts alphabetically, then wraps into columns of 7.
WRAPCOLS + HSTACK for two-column layout
=HSTACK(
WRAPCOLS(Names, 10, ""),
WRAPCOLS(Values, 10, "")
)
Creates two side-by-side columns where each contains wrapped name-value pairs.
Real-World Applications
E-Commerce Category Browser
Display product categories in a scrollable vertical multi-column layout:
=WRAPCOLS(
FILTER(Store_Categories[Name], Store_Categories[Active] = TRUE),
8,
""
)
Shows only active categories arranged in columns of 8 items each, perfect for mobile or tablet browsing.
Classroom Seating Arrangement
Arrange students into columns for desk assignment:
=WRAPCOLS(
SORT(Class_Roster),
6,
""
)
Creates columns of 6 students each, optimizing for vertical classroom layouts with multiple columns of desks.
Meeting Agenda Items
Display agenda topics in a columnar format for review:
=HSTACK(
{"Topic"},
WRAPCOLS(Agenda_Items, 12, ""),
{"Status"},
WRAPCOLS(Status_List, 12, "")
)
Combines agenda topics and statuses in parallel columns for easy cross-reference during meetings.
Survey Response Summary
Display response options vertically for analysis:
=WRAPCOLS(
SORT(Survey_Responses, 1, -1),
10,
""
)
Sorts responses by frequency descending, arranges in columns of 10 items each for report presentation.
Bulk Data Import Reformatting
Reformat single-column import data into vertical multi-column layout:
=WRAPCOLS(
FILTER(Raw_Import!A:A, Raw_Import!A:A <> ""),
12,
""
)
Takes imported records, removes blanks, and arranges into columns of 12 items for analysis.
Handling Edge Cases and Challenges
Issue: Perfect fit divides unevenly
When array length doesn’t divide evenly by wrap_count, the last column is incomplete.
Example: 17 items with wrap_count of 4 creates columns: [4, 4, 4, 1] with 3 #N/A values in the last column.
Solution: Specify pad_with to fill cleanly.
=WRAPCOLS(A1:A17, 4, "-")
Issue: #SPILL! error blocking output
If cells to the right or below are occupied, WRAPCOLS cannot spill.
Solution: Move the formula to an area with enough empty space, or clear the blocked cells.
Issue: Data with blanks creates uneven columns
Blank cells within the source data create spacing issues in the columnar output.
Solution: Clean the data first with FILTER.
=WRAPCOLS(
FILTER(A:A, A:A <> ""),
6,
""
)
Issue: Two-dimensional input causes error
WRAPCOLS requires a one-dimensional array. Multi-column input triggers #VALUE!.
Solution: Use TOCOL to flatten first.
=WRAPCOLS(
TOCOL(Range_2D),
5,
""
)
Issue: Comparing with WRAPROWS output
Accidentally using WRAPROWS instead of WRAPCOLS (or vice versa) creates wrong layout orientation.
Remember: For vertical browsing → WRAPCOLS; For horizontal browsing → WRAPROWS
Common Mistakes and How to Avoid Them
Mistake 1: Confusing wrap_count with column count
wrap_count represents values per column (rows), not total columns.
Wrong thinking: “I want 3 columns” → wrap_count = 3
Correct thinking: “I want 5 items per column” → wrap_count = 5
Mistake 2: Forgetting WRAPCOLS flows top-to-bottom
Unlike WRAPROWS (left-to-right), WRAPCOLS always flows downward first within each column.
Example confusion: With 20 items and wrap_count=4, WRAPCOLS creates 4 rows × 5 columns, NOT 5 rows × 4 columns.
Mistake 3: Using wrong function for desired layout
Choosing WRAPROWS when WRAPCOLS is needed (or vice versa) creates the wrong orientation.
Decision rule: If readers will scan downward, use WRAPCOLS; if left-to-right, use WRAPROWS.
Mistake 4: Providing two-dimensional range as vector
WRAPCOLS only accepts one-dimensional arrays.
Wrong: =WRAPCOLS(A1:C10, 5) (two-dimensional range)
Correct: =WRAPCOLS(TOCOL(A1:C10), 5) (flattened to one dimension)
Mistake 5: Not excluding header rows from data
Including headers in the source creates misaligned output.
Wrong: =WRAPCOLS(A1:A20, 5) (includes header in A1)
Correct: =WRAPCOLS(A2:A20, 5) (starts from data)
Mistake 6: Expecting #N/A to disappear without pad_with
The default behavior fills empty cells with #N/A errors.
Remember: Always specify pad_with unless #N/A is intentional for development visibility.
WRAPCOLS vs. Alternative Methods
| Method | Pros | Cons |
|---|---|---|
| WRAPCOLS Formula | One-line solution, dynamic, spills automatically, combines with other functions, maintains live connection | Requires Microsoft 365, #N/A padding without custom value |
| Manual Copy-Paste | Works in all Excel versions | Time-consuming, error-prone, doesn’t update dynamically, requires reformatting on data changes |
| Transpose + INDEX/MATCH | Works with older Excel versions, powerful for custom logic | Complex multi-step process, difficult to maintain and modify |
| Power Query | Powerful for complex transformations, scales well | Steeper learning curve, less transparent to casual users |
| Helper Columns + INDEX | Granular control available | Requires multiple helper columns, clutters spreadsheet, difficult to update |
Availability and Compatibility
WRAPCOLS is available in Microsoft 365 for Windows, Mac, and Excel for the web. It is not available in perpetual versions like Excel 2019, 2016, or earlier. For older Excel versions, you’ll need to use manual arrangement, helper column formulas, or Power Query as alternatives.
Tips for Mastering WRAPCOLS
- Clean your data first: Use FILTER to remove blanks before wrapping to ensure even columns.
- Always specify pad_with: Even for internal work, be explicit about padding to avoid #N/A clutter.
- Visualize the output: Sketch the desired layout before determining wrap_count values.
- Remember the flow direction: WRAPCOLS flows top-to-bottom within columns; WRAPROWS flows left-to-right within rows.
- Combine strategically: Pair WRAPCOLS with SORT, UNIQUE, FILTER, and TOCOL for sophisticated reshaping pipelines.
- Place formulas strategically: Ensure ample empty space below and to the right to prevent spill errors.
- Document your choices: Explain why you chose WRAPCOLS over WRAPROWS and what the wrap_count represents.
- Test with real data: Verify the output looks correct before deploying to dashboards or reports.
Troubleshooting Guide
| Error | Cause | Solution |
|---|---|---|
| #SPILL! | Cells to the right or below are occupied | Clear cells in the spill range or move formula to a location with empty space |
| #VALUE! | Input array is two-dimensional, not one-dimensional | Use TOCOL or TOROW to flatten the input first: =WRAPCOLS(TOCOL(A1:C10), 5) |
| #NUM! | wrap_count is less than 1 or invalid | Ensure wrap_count is a positive integer greater than 0 |
| #N/A in output | Last column not fully filled and no pad_with specified | Add pad_with argument: =WRAPCOLS(A1:A20, 5, “”) |
| #NAME? | Function not recognized | Verify Microsoft 365 subscription; update Excel to latest version |
| Wrong orientation output | Used WRAPCOLS when WRAPROWS needed (or vice versa) | Confirm data flows downward (WRAPCOLS) or left-to-right (WRAPROWS) as intended |
Performance Considerations
- Large arrays: Wrapping extremely large arrays (50,000+ items) can impact calculation time. Test with real data volumes before deployment.
- Nested functions: Combining WRAPCOLS with complex FILTER, SORT, UNIQUE operations may reduce performance on enterprise datasets.
- Spill range size: Larger output grids consume more memory and may slow screen rendering. Monitor spreadsheet responsiveness with typical data.
- External references: Wrapping data pulled from external sources or other files increases recalculation time on every refresh.
- Dependent formulas: Many formulas referencing the WRAPCOLS output with
#can compound performance impact.
Advanced Scenarios
Creating a responsive product gallery
=WRAPCOLS(
SORT(
FILTER(ProductDB[Name], ProductDB[Category] = Selected_Category),
1, 1
),
8,
""
)
Filters products by selected category, sorts alphabetically, and arranges in columns of 8 items for gallery display.
Building a vertical team roster
=HSTACK(
WRAPCOLS(SORT(HR[Names]), 15, ""),
WRAPCOLS(SORT(HR[Departments]), 15, ""),
WRAPCOLS(SORT(HR[Roles]), 15, "")
)
Creates side-by-side columns of names, departments, and roles for organizational directory.
Multi-language option selector
=WRAPCOLS(
FILTER(Options[Text], Options[Language] = ActiveLanguage),
7,
""
)
Displays survey or form options in the selected language, wrapped into columns of 7 items each.
Complex consolidation and reshaping
=WRAPCOLS(
SORT(
UNIQUE(
FILTER(
VSTACK(
Sales_Region_A,
Sales_Region_B,
Sales_Region_C
),
VSTACK(Sales_Region_A, Sales_Region_B, Sales_Region_C) <> ""
)
),
1, 1
),
6,
""
)
Consolidates sales data from three regions, removes duplicates and blanks, sorts alphabetically, then wraps into columns of 6 items.
Interactive filter panel with wrapped categories
=HSTACK(
{"Available Filters"},
WRAPCOLS(
UNIQUE(FILTER(Master_List[Category], Master_List[Category] <> "")),
10,
""
)
)
Creates a filter panel with header and available categories in wrapped columns for dashboard interaction.

