Returns a calculated array of a specified row and column size by applying a LAMBDA function.
תחביר
MAKEARRAY(rows, cols, lambda)ארגומנטים
rowsחובה
The number of rows in the array.
colsחובה
The number of columns in the array.
lambdaחובה
A LAMBDA function that takes two parameters: row index and column index.
The MAKEARRAY function creates a new array with the dimensions you specify. It uses a LAMBDA function to calculate each element based on its row and column index.
=MAKEARRAY(2, 2, LAMBDA(r, c, r*c))→{1, 2; 2, 4}Creates a 2x2 array where each cell value is the product of its row and column index.
Define dimensions
Specify the number of rows and columns for the resulting array.
Write the LAMBDA function
Define a LAMBDA function with two variables representing the current row and column index.
Yes, the LAMBDA function can return text, numbers, or even other arrays.