ARRAY.JOIN function

This article describes the formula syntax of the ARRAY.JOIN function.

Description

Return the concatenation of two arrays.

Syntax

ARRAY.JOIN(array1, array2)

array1 is an array or handle to an array.
array2 is an array.

Join two arrays. The shape of the returned array is determined by the shape of the first array. If the first array is a single column then so is the result. If the first array is a single row then so is the result. If the first array has more than one row the resulting array has the same number of columns as the first array. If the size of the second array is not a multiple of the number of columns of the first array then the last partial row is omitted.

If array1 is a handle then array2 is appended to the associated in-memory array and the handle to the first array is returned. If array2 is a handle and array1 is not, then array1 is prepended to the in-memory array and the handle for the second array is returned. In this case the shape of the result is determined by the second array as described above.

This function is useful for buffering data produced by Excel into memory. For example, ARRAY.TAKE(4, ARRAY.JOIN(RAND(), handle)) returns a handle to (at most) the last 4 values generated by RAND(). Use ARRAY.TAKE(-4, ARRAY.JOIN(handle, RAND()) to get the same items in reverse order more efficiently.

See Also

\ARRAY , ARRAY.TAKE