EXPAND

Formulas / EXPAND
Expand an array by adding rows and columns.
=EXPAND(array, [rows], [columns], [pad_with])
  • array - required, the array to expand
  • rows - [OPTIONAL] the final number of rows
  • columns - [OPTIONAL] the final number of columns
  • pad_with - [OPTIONAL] the value to pad the array with

Examples

  • =EXPAND(C6:D13, 12, 3) expands the array C6:D13 to 12 rows and 3 columns. This is useful for when a user wants to increase the size of an array with a set number of rows and columns.

  • =EXPAND(C6:D13, 12, 3, "-") pads the new array values with a hyphen. This is useful when a user wants to add values to an array that are easily distinguishable from the original values.

  • =EXPAND(C6:D13, 12, , "-") increases the initial array to 12 rows. This is useful when a user wants to increase the size of an array without changing the number of columns.

  • =EXPAND(A4:C15, , 4, "-") expands the array to the right to four columns. This is useful when a user wants to increase the size of an array without changing the number of rows.

Summary

The EXPAND function is a useful tool for adding rows and columns to an array. It takes four arguments, and the row and column numbers supplied determine the dimensions of the resulting array.

  • The EXPAND function adds columns and rows to an array.
  • The arguments required are the array to expand, and the dimensions of the final array (columns and rows). The optional arguments are the number of columns and rows to expand and the "pad_with" argument.


Frequently Asked Questions

What is the EXPAND function?
The EXPAND function expands an array. It pads the array with a value of your choosing.
What are the arguments for the EXPAND function?
The arguments for the EXPAND function are array, rows, columns, and pad_with.
What happens if the array is too large?
The EXPAND function returns a #NUM! error if the array is too large.
Sourcetable Logo

Work smarter

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

Drop CSV