MAKEARRAY(rows, columns, lambda)
=MAKEARRAY(2,3,LAMBDA(r,c,r*c))
The MAKEARRAY function can be used to generate a 2x3 array of numbers. In this example, we will use the formula to generate an array of numbers. This formula multiplies the row and column numbers of each cell to generate the value for the cell. The result of this formula is {1,2,3;2,4,6}. This array contains six cells with values of 1, 2, 3, 4, 5, and 6.
=MAKEARRAY(2,3,LAMBDA(r,c,0))
The MAKEARRAY function can also be used to generate a 2x3 array of zeroes. In this example, we will use the formula to generate an array of zeroes. This formula sets the value of each cell to 0. The result of this formula is {0,0,0;0,0,0}. This array contains six cells with values of 0.
=MAKEARRAY(2,3,LAMBDA(r,c,"x"))
The MAKEARRAY function can also be used to generate a 2x3 array of characters. In this example, we will use the formula to generate an array of characters. This formula sets the value of each cell to "x". The result of this formula is {"x","x","x";"x","x","x"}. This array contains six cells with values of "x".
The MAKEARRAY function allows users to create an array with custom rows and columns using a LAMBDA calculation. It is possible to create arrays with variable dimensions and the values in the array will be calculated.