Contact

Numbers MAKEARRAY: Generated Grids, Indices and LAMBDA Examples

Logical and Information Intermediate Apple Numbers

Generate Numbers multiplication, numbered-position and diagonal arrays with MAKEARRAY, explicit INDEX output cells and independent total checks.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

MAKEARRAY constructs a numeric array with a chosen number of rows and columns. Its LAMBDA calculation receives each result’s row and column indices, allowing you to generate multiplication grids, position labels or a diagonal pattern.

Apple’s simple two-row, three-column example uses r*c and returns 1,2,3 followed by 2,4,6. The examples below make every output location explicit with INDEX.

Availability and version history

  • Introduced: The original introduction release and date are not established by the checked references. LAMBDA’s separately documented introduction does not establish this helper’s first release.
  • Availability: Currently documented in Apple’s Functions Help 15.4 documentation edition; no final supported-version endpoint is established.
  • Scope: Shared iWork reference. Function-specific historical Mac, iPad, iPhone and iCloud endpoints are unverified.
  • Checked: October 14, 2026, against the official MAKEARRAY reference. Examples were independently calculated; no native Numbers test was performed.

Syntax and dimensions

MAKEARRAY(number-of-rows, number-of-columns,
          LAMBDA(row_index, column_index, calculation))

The official MAKEARRAY reference requires row and column counts greater than zero. The LAMBDA receives the result’s row and column indices; the calculation is required and must be last.

The source example establishes indices starting at one. These are positions in the generated array, not the worksheet coordinates of the cell where you place a result. The page does not settle fractional dimensions, maximum array sizes or every invalid-count error, so the examples use small positive integer dimensions.

Generate a three-by-four multiplication grid

Create ArrayGrid, with ten columns A:J and eight rows, using no header row so the following cell positions are literal. Put Rows in A1 and 3 in B1, then Columns in C1 and 4 in D1.

Put result-row indices 1,2,3 in A3:A5 and result-column indices 1,2,3,4 in C2:F2. In C3 enter:

=INDEX(MAKEARRAY($B$1,$D$1,LAMBDA(r,c,r*c)),$A3,C$2)

Fill C3 across through F3, then fill C3:F3 down through row 5.

Output row C D E F
3 1 2 3 4
4 2 4 6 8
5 3 6 9 12

The anchored counts remain B1 and D1. The result-row index stays in column A, while the result-column index stays in row 2. F5 selects row three and column four of the generated array, yielding 3×4=12.

The INDEX reference supports arrays returned by functions. Here it turns each array element into an ordinary scalar result with a specific destination.

Check row totals and the complete array

Enter =SUM(C3:F3) in H3 and fill through H5 for 10,20,30. Put =SUM(C3:F5) in H7 for 60.

For a direct multiplication control, enter =$A3*SUM($C$2:$F$2) in I3 and fill through I5, again giving 10,20,30. Put =H3-I3 in J3 and fill through J5 for zeros. These checks compare the generated grid with its visible position labels.

Do not include the parameter cells or row/column labels in the result total. Changing B1 or D1 requires updating the visible extraction indices and output area too. An INDEX request beyond the new generated shape is not part of the intended calculation.

Advanced: number positions across a fixed-width grid

Copy ArrayGrid to NumberedGrid, keeping B1=3, D1=4 and all index labels unchanged. Replace C3 with:

=INDEX(MAKEARRAY($B$1,$D$1,LAMBDA(r,c,(r-1)*$D$1+c)),$A3,C$2)

Fill across to F3, then down through row 5. The output becomes:

Output row C D E F
3 1 2 3 4
4 5 6 7 8
5 9 10 11 12

H3:H5 becomes 10,26,42 and H7 becomes 78. Clear I3:J5 on this copy because those controls belonged to the multiplication grid. In H8 enter =($B$1*$D$1)*($B$1*$D$1+1)/2 for 78, independently checking the sum of positions one through twelve.

Each row’s offset is the count of positions in earlier rows: (r−1)×four. The numbers describe this shape and arrangement. They are not permanent record identifiers; changing the width would change labels for later rows.

Build a diagonal unit pattern

Create UnitPattern, with eight columns A:H and six rows, again using no header row. Put row indices 1,2,3 in A2:A4 and column indices 1,2,3 in B1:D1.

In B2 enter =INDEX(MAKEARRAY(3,3,LAMBDA(r,c,IF(r=c,1,0))),$A2,B$1), fill through D2 and then fill B2:D2 down through row 4. Expect:

Output row B C D
2 1 0 0
3 0 1 0
4 0 0 1

Put =SUM(B2:D2) in F2 and fill through F4 for one in each row. Put =SUM(B2:B4) in B6 and fill across through D6 for one in each column. Put =SUM(B2:D4) in F6 for 3.

This numeric pattern follows the test r=c. It illustrates an index-dependent calculation without assuming a built-in identity-matrix function or overwriting an input matrix.

Source example and array-layout scope

To reproduce Apple’s first illustration, create VendorArray, with eight columns A:H and five rows, using no header row. Put indices 1,2 in A2:A3 and 1,2,3 in C1:E1. In C2 enter =INDEX(MAKEARRAY(2,3,LAMBDA(r,c,r*c)),$A2,C$1), fill through E2, then down through row 3. The two rows are 1,2,3 and 2,4,6.

Apple also illustrates MAKEARRAY with a random-number calculation. That is a different use case: it has no fixed expected grid, and these deterministic checks do not establish recalculation or random-distribution behavior.

The examples use scalar INDEX extraction. Native automatic spill placement and array limits have not been measured here; avoid assuming that the displayed worksheet arrangement is a tested spill result.

Local definitions and practical limits

Apple’s LAMBDA reference says definitions are local to their cell and LAMBDA functions cannot be nested. Each formula here contains one local LAMBDA definition; copying the formula copies it rather than creating a workbook-wide named function.

The examples use explicit numeric inputs. Mixed text, error cells, empty arrays, malformed parameters, array-valued intermediate results and exact runtime errors are outside the checked examples. Preserve the input/output separation and choose a calculation that matches the meaning and units of your data.

English formulas use decimal points and commas. Apple’s functions overview specifies semicolon argument separators when the decimal separator is a comma. These examples do not establish cross-client import or localized error behavior.

LAMBDA defines the calculation, INDEX selects a result, IF creates the diagonal and SUM checks totals.