MAKEARRAY Function in Google Sheets

Create an array by applying a `LAMBDA` function to each cell using the MAKEARRAY function.

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

  1. 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.