Lookup & Reference

WRAPROWS Function in Excel

Wraps a row or column of values into a 2D array after a specified number of elements.

Syntax

  • =WRAPROWS(vector, wrap_count, [pad_with])

Arguments

  • vector (required): Row or column to wrap
  • wrap_count (required): Number of values per row
  • pad_with (optional): Value for padding (default #N/A)

Examples

  • =WRAPROWS(A1:A12, 4) - Wrap 12 items into 3 rows of 4 - Result: 3x4 array

When to use WRAPROWS

  • Use WRAPROWS when you need to retrieve values from a table or range based on a key.
  • Confirm data types match (text vs number) and trim spaces before lookups.
  • Pair with [IFERROR](/functions/iferror/) or [IFNA](/functions/ifna/) for cleaner reports.
  • See the [lookup functions guide](/guides/excel-lookup-functions-guide/) for VLOOKUP, XLOOKUP, and INDEX MATCH paths.

Common WRAPROWS mistakes

  • #N/A often means the key is missing or exact match is wrong — see [#N/A error](/errors/na/).
  • Lock table references with $ when copying formulas down a column.
  • Compare legacy vs modern lookups in [XLOOKUP vs VLOOKUP](/compare/xlookup-vs-vlookup/).

Common errors

  • Requires Excel 365

Use cases

  • Reshape data
  • Create tables
  • Data transformation

Frequently asked questions

  • What is WRAPROWS in Excel? WRAPROWS converts a single row or column into a 2D array by wrapping values into rows of specified width. For 12 items with wrap_count=4, you get 3 rows of 4 columns. It's useful for reshaping imported data.
  • How do I handle uneven data with WRAPROWS? Use the pad_with argument to fill incomplete rows. =WRAPROWS(A1:A10, 4, 0) wraps 10 items into 3 rows, padding the last row with zeros. Default padding is #N/A. Use "" for empty cells.
  • What is the difference between WRAPROWS and WRAPCOLS? WRAPROWS fills by rows (left to right, then next row). WRAPCOLS fills by columns (top to bottom, then next column). For 1-12 with wrap=4: WRAPROWS gives 1-4 in row 1; WRAPCOLS gives 1,5,9 in row 1.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.