# Google Sheets MAKEARRAY Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/makearray-function
- Author: Better Analyst

Formula Bot is now Better Analyst—same account, more powerful analysis.Formula Bot is now Better Analyst—same account and workflows, with more powerful analysis, dashboards, and automation.

[Learn what changed](https://betteranalyst.com/formula-bot-is-now-better-analyst)

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

```
MAKEARRAY(rows, columns, LAMBDA)
```

Generate FormulaExplain Formula

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

Describe the MAKEARRAY you need in plain EnglishGenerate Formula

## 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:

| | 1 | 2 | 3 | 4 | 5 |
| - | - | - | - | - | - |
| 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:

```
=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:

| | 1 | 2 | 3 | 4 | 5 |
| - | - | - | - | - | - |
| 1 | 1 | 2 | 3 | 4 | 5 |
| 2 | 2 | 4 | 6 | 8 | 10 |
| 3 | 3 | 6 | 9 | 12 | 15 |
| 4 | 4 | 8 | 12 | 16 | 20 |
| 5 | 5 | 10 | 15 | 20 | 25 |

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.

[Create Free Account](https://betteranalyst.com/signup)[Try Formula Generator](https://betteranalyst.com/excel-ai)

## Google Sheets how-to guides

- [How To Lock Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-lock-cells-in-google-sheets)
- [How To Make A Copy Of An Google Sheets Sheet](https://betteranalyst.com/google-sheets/how-to-make-a-copy-of-an-google-sheets-sheet)
- [How To Make A Graph In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-graph-in-google-sheets)
- [How To Make A Histogram In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-histogram-in-google-sheets)
- [How To Make A Line Graph In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-line-graph-in-google-sheets)
- [How To Make A Pie Chart In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-pie-chart-in-google-sheets)
- [How To Make A Table In Google Sheets](https://betteranalyst.com/google-sheets/how-to-make-a-table-in-google-sheets)
- [How To Merge Cells In Google Sheets](https://betteranalyst.com/google-sheets/how-to-merge-cells-in-google-sheets)

## 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.](https://chatgpt.com/?prompt=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
2. [02ClaudeOpen the same research prompt in Claude.](https://claude.ai/new?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
3. [03PerplexityResearch the comparison with linked web sources.](https://www.perplexity.ai/search?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)

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