WRAPCOLS function in Google Sheets
Wraps the provided row or column of cells by columns after a specified number of elements to form a new array.
=WRAPCOLS(range, wrap_count, [pad_with])WRAPCOLS syntax and parameters
Three arguments, two required.
- rangerangeRequired
The range to wrap.
- wrap_countnumberRequired
The maximum number of cells for each column. If the value isn’t a whole number, it’s rounded down to the nearest whole number.
- pad_withanyOptional
The value with which to fill the extra cells in the range. By default, the WRAPCOLS function fills the extra cells with #N/A.
WRAPCOLS examples
Formulas you'll actually reuse.
A 24-month list split into two columns of 12 — year 1 beside year 2:
=WRAPCOLS(A2:A25, 12)Days into week-columns, padding the short last one with blanks instead of #N/A:
=WRAPCOLS(A2:A31, 7, "")
WRAPCOLS in Excel
Same name — your formula ports as-is.
Try WRAPCOLS in the playground
Edit the example — nothing to install.
Preloaded with the WRAPCOLS formula from Example 1 — change anything and watch it respond.
Related functions
More ways Google Sheets gets this done.
- CHOOSECOLSCreates a new array from the selected columns in the existing range.ArrayExcel
- CHOOSEROWSCreates a new array from the selected rows in the existing range.ArrayExcel
- HSTACKAppends ranges horizontally and in sequence to return a larger array.ArrayExcel
- LINESTGiven partial data about a linear trend, calculates various parameters about the ideal linear trend using the least-squares method.ArrayExcel
- MDETERMReturns the matrix determinant of a square matrix specified as an array or range.ArrayExcel
- MINVERSEReturns the multiplicative inverse of a square matrix specified as an array or range.ArrayExcel