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.

Microsoft 365, Excel 2021, Excel 2024, and Excel for the web. Also in Google Sheets.

Syntax =SEQUENCE(rows, [columns], [start], [step])

SEQUENCE
=SEQUENCE(3,1,10,5)

Arguments

NameRequiredWhat to pass
rowsRequiredHow many rows to spill.
columnsOptionalHow many columns. The default is 1.
startOptionalThe first number. The default is 1.
stepOptionalHow 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

=SEQUENCE(3,1,10,5)A1
Sequence
A
110
215
320
A picture of the sheet, not a live calculator. A2 and A3 are the spill. SEQUENCE(4) with no other arguments is 1, 2, 3, 4.

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.