EXPAND
pads an array to a given size with a fill value · from excel · excel: verified match · no sheets equivalent
signature
EXPAND(array, rows, [columns], [pad_with])
returns: array
| argument | required |
|---|---|
| array | required |
| rows | required |
| columns | optional · defaults to 3 |
| pad_with | optional |
examples
formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.
| A | B | |
|---|---|---|
| 1 | 10 | 2 |
| 2 | 20 | 4 |
fx
=EXPAND(A1:B2, 3, 3, "-") 10 errors
error values observed from the engine — each with a call that produces it.
| error | produced by |
|---|---|
| #VALUE! | =EXPAND(A1:A3,2) |
related
- ARRAY_CONSTRAIN truncates a range to at most the given rows and columns
- ARRAYFORMULA evaluates an expression across a range (this engine already spills, so it is a pass-through for sheets compatibility)
- ARRAYTOTEXT converts array to text representation
- BYCOL applies lambda to each column of array
- BYROW applies lambda to each row of array
- CHOOSECOLS returns the specified columns from an array