Function · Dynamic arrays
Excel SEQUENCE function
The Excel SEQUENCE function spills a run of numbers. Three rows starting at 10 and stepping by 5 are 10, 15, and 20.
Syntax =SEQUENCE(rows, [columns], [start], [step])
=SEQUENCE(3,1,10,5)Arguments
| Name | Required | What to pass |
|---|---|---|
| rows | Required | How many rows to spill. |
| columns | Optional | How many columns. The default is 1. |
| start | Optional | The first number. The default is 1. |
| step | Optional | How much to add for each next number. The default is 1. A negative step counts down. |
Examples
10, 15, and 20 down a column
=SEQUENCE(3,1,10,5)Result 10, 15, and 20
| A | |
|---|---|
| 1 | 10 |
| 2 | 15 |
| 3 | 20 |
SEQUENCE writes a run of numbers into a spill. Three rows, one column, starting at 10 and stepping by 5, are 10, 15, and 20. Leave the optional arguments off and SEQUENCE(4) is 1 through 4 down a column. A column count greater than 1 fills across, then down.
The step can be negative. SEQUENCE(3, 1, 20, -5) is 20, 15, 10. People use it to number rows for a sample, or as the column index inside INDEX, without typing the numbers. The result is a formula. Clear it and the numbers go away. MAKEARRAY is the grid when each cell has its own rule. SEQUENCE(3,1,1200,50) is the straight $50 step for one rent, $1,200, $1,250, and $1,300. Excel 2019 does not have SEQUENCE.