FormulaCraft

How to use MAKEARRAY with LAMBDA in Excel and Google Sheets

Topic:LAMBDA (reusable formulas)
Excel & Google Sheets
=MAKEARRAY(5, 5, LAMBDA(r, c, r * c))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Decide the dimensions of the grid you need — rows and columns are both hardcoded numbers or cell references.
  2. 2In A1, enter =MAKEARRAY(5, 5, LAMBDA(r, c, r * c)) to generate a 5×5 multiplication table. The formula spills into A1:E5.
  3. 3r is the 1-based row index (1 to 5); c is the 1-based column index (1 to 5). The body r * c computes the product for each cell.
  4. 4Change the body to any expression: r + c for an addition table, IF(r=c,1,0) for an identity matrix, or a nested formula referencing external ranges.
  5. 5Reference cell values from another range inside the LAMBDA by using INDEX(source, r, c) to pull from an existing dataset.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

How do I generate a date calendar grid with MAKEARRAY?

Use =MAKEARRAY(5, 7, LAMBDA(r, c, DATE(2024,1,1) + (r-1)*7 + (c-1))) to produce a 5-week × 7-day grid of dates starting on a given date.

Can MAKEARRAY reference values from another sheet?

Yes. Inside the LAMBDA body use INDEX(Sheet2!A1:Z50, r, c) to pull from an existing range. The LAMBDA has full access to any in-workbook reference.

What is the maximum size for MAKEARRAY?

There is no documented hard limit beyond the sheet grid itself (1,048,576 rows × 16,384 columns in Excel). Practically, very large grids will slow calculation significantly.

More on LAMBDA (reusable formulas)

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: