MAKEARRAY
Returns a calculated array of a specified row and column size, by applying a LAMBDA.
LogicalDynamic Arrays & LAMBDALogic & ConditionsModern Excel Functions
What it does
Generates an array of dimensions (rows, cols) where each value is calculated by a LAMBDA function.
Syntax
MAKEARRAY(rows, cols, lambda)
Arguments
rows(number) β Number of rows.cols(number) β Number of columns.lambda(function) β LAMBDA(row, col) to compute value.
Examples
Multiplication Table
Create a 3x3 mult table.
FORMULA
=MAKEARRAY(3, 3, LAMBDA(r,c, r*c))
RESULT
[1, 2, 3; 2, 4, 6; 3, 6, 9]
SAMPLE DATA
| A | B | C | |
|---|---|---|---|
| 1 | 1 | 2 | 3 |
| 2 | 1 | 2 | 3 |
| 3 | 2 | 4 | 6 |
| 4 | 3 | 6 | 9 |