WRAPCOLS

Formulas / WRAPCOLS
Wrap an array into columns.
WRAPCOLS(vector, wrap_count, [pad_with])
  • vector - required, array or range to wrap
  • wrap_count - required, length of each column
  • pad_with - optional, padding for the columns

Examples

  • =WRAPCOLS(C2:J2,4)

    This formula wraps the range C2:J2 into columns that each contain the value 4. This means that the values of each cell in the range C2:J2 will be split into four columns, and each column will contain the same value as the original cells in the range.

  • =WRAPCOLS(B3:B14,4)

    This wraps the range B3:B14 into four columns that each contain values. This means that the values of each cell in the range B3:B14 will be split into four columns, and each column will contain different values from the original cells in the range.

  • =WRAPCOLS(B3:B12,4,"x")

    This formula wraps the range B3:B12 into columns that each contain 4 values, and pads each column with "x". This means that the values of each cell in the range B3:B12 will be split into four columns, and each column will contain four values, with any empty cells in the original range filled with the character "x".

Summary

The WRAPCOLS function divides a row or column of values into an array and returns the result. It requires three arguments: vector, wrap_count, and pad_with. WRAPCOLS will return an error if the vector is not a one-dimensional array.

  • The WRAPCOLS function takes a one-dimensional array and wraps it into a two-dimensional array with a specified number of columns.
  • The length of each column is determined by the wrap_count argument.


Frequently Asked Questions

What is the WRAPCOLS Function?
The WRAPCOLS function is a programming command used to wrap a row or column of values into a new array.
What does the WRAPCOLS Function Return?
The WRAPCOLS function returns the wrapped array.
What are the Benefits of Using the WRAPCOLS Function?
  • It allows for easy manipulation of data.
  • It can help reduce the amount of code needed for a task.
  • It simplifies complex computations.
What are the Limitations of the WRAPCOLS Function?
  • It is limited to wrapping data in a single row or column.
  • It may not be suitable for large datasets.
  • It is not compatible with all programming languages.
Where Can I Find More Information About the WRAPCOLS Function?
More information about the WRAPCOLS function can be found in various programming resources or online tutorials. Additionally, the WRAPCOLS function is documented in the official documentation of many programming languages.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV