MAKEARRAY Function
The MAKEARRAY
function in Google Sheets creates an array by applying a specified LAMBDA
function to each cell in a defined range.
Syntax
MAKEARRAY(rows, columns, LAMBDA)
rows
: The number of rows in the array.columns
: The number of columns in the array.LAMBDA
: A custom function to apply to each cell.
Examples
- Basic Example
Create a 3x3 array where each cell is the product of its row and column indices:
=MAKEARRAY(3, 3, LAMBDA(r, c, r * c))
Notes
- Useful for generating arrays based on custom logic.
Related Functions
ARRAYFORMULA
: Apply a function to a range of cells.