How to Use MAKEARRAY Function in Excel + Tips
Learn how to use MAKEARRAY function in Excel step-by-step to create dynamic arrays with custom formula with simple examples, tips.
Hello everyone! Today i will show you how to use MAKEARRAY function in Microsoft Excel step by step. MAKEARRAY function available in Excel 365, Excel 2024, and Excel for Web.
1. What is MAKEARRAY Function in Excel?
The MAKEARRAY function is a dynamic array function in Excel. It allows you to create a grid or array of rows and columns with custom calculation using LAMBDA function.
Think of MAKEARRAY like a custom grid generator:
- You choose how many rows and columns you want.
- You give a rule
LAMBDA(r, c, ...)to calculate every position cell. - Excel automatically builds the whole table for you in one formula!
2. 🛠️ Formula Syntax & Parameters
The MAKEARRAY formula syntax is as follows:
=MAKEARRAY(rows, columns, lambda)
rows: Required. The number of rows in the array (must be greater than 0).columns: Required. The number of columns in the array (must be greater than 0).lambda: Required. ALAMBDAfunction that takes 2 parameters:LAMBDA(row, col, calculation).row: The current row index (from 1 torows).col: The current column index (from 1 tocolumns).
3. 📋 Practical Examples
Example 1: Create a Simple Multiplication Table
You can build a 5x5 multiplication table using row index multiplied by column index:
=MAKEARRAY(5, 5, LAMBDA(r, c, r * c))
👉 Result: Generates a 5-row by 5-column table showing r * c:
| Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | |
|---|---|---|---|---|---|
| Row 1 | 1 | 2 | 3 | 4 | 5 |
| Row 2 | 2 | 4 | 6 | 8 | 10 |
| Row 3 | 3 | 6 | 9 | 12 | 15 |
| Row 4 | 4 | 8 | 12 | 16 | 20 |
| Row 5 | 5 | 10 | 15 | 20 | 25 |
Example 2: Generate Cell Coordinates Label (R1C1 Style)
Create a 3x3 table showing position label for each cell:
=MAKEARRAY(3, 3, LAMBDA(r, c, "R" & r & "C" & c))
👉 Result:
| Col 1 | Col 2 | Col 3 | |
|---|---|---|---|
| Row 1 | R1C1 | R1C2 | R1C3 |
| Row 2 | R2C1 | R2C2 | R2C3 |
| Row 3 | R3C1 | R3C2 | R3C3 |
Example 3: Create Sequential Numbers Grid (4 Rows x 3 Columns)
You can calculate sequential sequence numbers across rows and columns:
=MAKEARRAY(4, 3, LAMBDA(r, c, (r - 1) * 3 + c))
👉 Result: Fills numbers from 1 to 12 across 4 rows and 3 columns:
| Col 1 | Col 2 | Col 3 | |
|---|---|---|---|
| Row 1 | 1 | 2 | 3 |
| Row 2 | 4 | 5 | 6 |
| Row 3 | 7 | 8 | 9 |
| Row 4 | 10 | 11 | 12 |
Example 4: Generate Random Test Scores Table
Quickly create 3x3 grid of random numbers between 50 and 100:
=MAKEARRAY(3, 3, LAMBDA(r, c, RANDBETWEEN(50, 100)))
👉 Result: Automatically fills a 3x3 table with random scores!
💡 Quick Tips for Using MAKEARRAY Function
- LAMBDA Must Have 2 Arguments Always: The
LAMBDAinsideMAKEARRAYMUST always take exactly 2 arguments (likerfor row,cfor column). Even if your calculation only usesrorc, you cannot omit the second parameter! - Row and Column Numbers Start at 1:
ralways starts at 1 (first row) andcalways starts at 1 (first column). - Great for Mock Data & Matrices: Combine
MAKEARRAYwithRANDBETWEEN()orIF()to generate test datasets or identity matrices instantly without dragging formulas down. - Excel Version Requirement:
MAKEARRAYrequires Microsoft 365, Excel 2024, or Excel for Web.
📚 Related Resources & Tutorials
Related Tutorials
Opens in new tab ↗How to Use MAP Function in Excel + Tips
Learn how to use MAP function in Excel step-by-step to apply formula to each item in array with simple examples, tips.
How to Use SCAN Function in Excel + Tips
Learn how to use SCAN function in Excel step-by-step to calculate running totals, cumulative sums, and fill blank cells with easy examples and tips.
INT vs MOD Function in Excel: What is the Difference? (Easy Guide)
Learn the difference between INT and MOD functions in Excel. Very simple examples to help you understand whole numbers and remainders.