Google Sheets MAKEARRAY Function: Syntax, Examples & Tips

The MAKEARRAY function creates an array by specifying the number of rows and columns, along with a custom formula to populate each cell.
Google Sheets
MAKEARRAY(rows, columns, LAMBDA)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is the MAKEARRAY Function?
  3. A Practical Example
  4. MAKEARRAY Formula
  5. Result of the Formula
  6. Why Use MAKEARRAY?
  7. Key Takeaways:
  8. Example use case

Parameters

rows:
The number of rows that the array will have.

columns:
The number of columns that the array will have.

LAMBDA:
A function that defines how to calculate the values for each cell in the array, taking the row and column indices as parameters.

What is the MAKEARRAY Function?

The MAKEARRAY function in Google Sheets is a versatile tool that allows users to create an array of values based on specified dimensions and a custom formula. This function is particularly useful for generating dynamic arrays that can be used for calculations, data manipulation, or even for creating complex data structures without the need for manual entry.

In simpler terms, MAKEARRAY enables you to generate a grid of values in a single formula, making it easier to handle large datasets and perform operations on them efficiently.

A Practical Example

Imagine you want to create a multiplication table for the numbers 1 through 5:

Multiplication Table:

12345
1
2
3
4
5

You want to fill in this table with the product of the row and column headers.

MAKEARRAY Formula

To achieve this, you would use the MAKEARRAY function as follows:

Google Sheets
=MAKEARRAY(5, 5, LAMBDA(r, c, r * c))

In this formula:

  • 5 is the number of rows you want in the array.
  • 5 is the number of columns you want in the array.
  • LAMBDA(r, c, r * c) is a custom function that takes the row index r and column index c and returns their product.

Result of the Formula

When you apply the MAKEARRAY formula, the output would look like this:

12345
112345
2246810
33691215
448121620
5510152025

This table now dynamically displays the products of the numbers 1 through 5.

Why Use MAKEARRAY?

MAKEARRAY is beneficial because it simplifies the process of generating arrays in Google Sheets. It allows for dynamic calculations without the need for extensive manual data entry. Additionally, it can be combined with other functions to create more complex data manipulations, making your spreadsheets more powerful and efficient.

Key Takeaways:

  • MAKEARRAY: A Google Sheets function that creates an array of values based on specified dimensions and a custom formula.
  • Dynamic: Generates values on-the-fly, reducing the need for manual data entry.
  • Custom Functions: Allows the use of LAMBDA functions to define how the array values are calculated.
  • Common Use Cases: Ideal for creating tables, performing batch calculations, and generating structured data without manual input.

MAKEARRAY is an essential function for anyone looking to enhance their data manipulation capabilities in Google Sheets, providing a powerful way to automate and streamline data entry and calculations.

Happy spreadsheeting!

Example use case

You have a dataset of sales data with columns for product IDs and sales figures. Using the MAKEARRAY function, you can create a dynamic summary table that calculates total sales per product, allowing for quick analysis and visualization of sales performance.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.