Google Sheets Function: MAKEARRAY
The MAKEARRAY function returns an array of specified dimensions with values calculated by a LAMBDA function.
Prerequisite: understand the LAMBDA function.
Usage:
=MAKEARRAY(rows, columns, LAMBDA)
Example of use
The objective here will be to generate a 10x10 table numbered from 1 to 100 using a single formula.
Start by entering the MAKEARRAY function followed by the number of rows and columns of the table to be generated by the function:
=MAKEARRAY(10,10
Then add the LAMBDA function and choose two names for the variables that will contain the row and column numbers of the table:
=MAKEARRAY(10,10,LAMBDA(row,column
And to finish, add the formula useful for numbering from 1 to 100:
=MAKEARRAY(10,10,LAMBDA(row,column,column+10*(row-1)))
The MAKEARRAY function will then generate a table of 10 rows and 10 columns and return values that are calculated based on their position (row/column) in the table: