1. Home
  2. Functions
  3. Array
  4. MAKEARRAY

MAKEARRAY function

Builds an array of the given size by calling a LAMBDA with each row and column number.

Syntax

=MAKEARRAY(rows, columns, lambda)

Arguments

ArgumentRequiredDescription
rowsRequiredNumber of rows
columnsRequiredNumber of columns
lambdaRequiredLAMBDA(row, column)

How to use MAKEARRAY

When MAKEARRAY returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

MAKEARRAY takes 3 required arguments. Type =MAKEARRAY( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=MAKEARRAY(2, 2, LAMBDA(r, c, r*c))Result 2 by 2 array
Spilled result
AB
112
224

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.