SEQUENCE
Generates a sequential numeric array with configurable size, start, and step.
SEQUENCE fills values row-by-row and returns a dynamic spill.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=SEQUENCE(rows, [columns], [start], [step])
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
rows | number | Required | — |
columns | number | Optional | 1 |
start | number | Optional | 1 |
step | number | Optional | 1 |
Remarks
- Defaults:
columns=1,start=1,step=1. - Values are emitted as integers when integral, otherwise as floating-point numbers.
- Result spills to the requested dimensions.
Error cases
rowsandcolumnsmust be positive; otherwise returns#VALUE!.
Examples
Generate four consecutive numbers in one column.
Formula =SEQUENCE(4)
Expected result {1; 2; 3; 4}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Fill two rows and three columns, starting at ten and increasing by five.
Formula =SEQUENCE(2,3,10,5)
Expected result {10, 15, 20; 25, 30, 35}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A single-cell sequence returns its starting value.
Formula =SEQUENCE(1,1,42,0)
Expected result 42
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A sequence with zero rows cannot produce an array.
Formula =SEQUENCE(0,2)
Expected result #VALUE!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Simple vertical sequence
Formula =SEQUENCE(5)
Expected result {1; 2; 3; 4; 5}
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
What input values are invalid for SEQUENCE?
rows and columns must be positive numbers; zero or negative sizes return #VALUE!.
Does SEQUENCE fill by rows or by columns first?
SEQUENCE fills row-by-row across columns, then continues on the next row using the same step increment.