Skip to content
Google Sheets

MAKEARRAY function in Google Sheets

Returns an array of specified dimensions with values calculated by application of a LAMBDA function.

=MAKEARRAY(rows, columns, LAMBDA)

MAKEARRAY syntax and parameters

Three arguments, three required.

  • rowsnumberRequired

    The number of rows to return.

  • columnsnumberRequired

    The number of columns to return.

  • LAMBDAanyRequired

    A LAMBDA that’s applied to create the array. Syntax: LAMBDA(name1, name2, formula_expression) Learn more about LAMBDA functions. Requirements: The LAMBDA must have exactly 2 name arguments along with a formula_expression which uses those names. When applying the LAMBDA, name1 resolves to the current row_index and name2 resolves to the current column_index.

MAKEARRAY examples

Formulas you'll actually reuse.

  1. A 12×12 multiplication table from row and column indexes:

    =MAKEARRAY(12, 12, LAMBDA(r, c, r * c))
  2. A 5×3 grid with ones on the diagonal:

    =MAKEARRAY(5, 3, LAMBDA(r, c, IF(r = c, 1, 0)))

MAKEARRAY in Excel

Same name — your formula ports as-is.

Try MAKEARRAY in the playground

Edit the example — nothing to install.

Preloaded with the MAKEARRAY formula from Example 1 — change anything and watch it respond.

Loading the editor…