The short answer
=SEQUENCE(rows, [columns], [start], [step]) creates a grid of numbers. Type =SEQUENCE(10) into a cell and Excel returns 1 through 10 down a column. Only the first argument, rows, is required.
SEQUENCE works in Excel for Microsoft 365, Excel 2021 and Excel for the web. If you’re looking for how to generate sequence of numbers in excel without dragging, this one formula does the job.
Basic examples
- =SEQUENCE(10) returns 1 to 10 down a column.
- =SEQUENCE(1,5) returns 1 to 5 across a row.
- =SEQUENCE(4,1,10,5) returns 10, 15, 20 and 25 down a column. The 10 is the start, and the 5 is the step, which is the amount added each time.
With two columns, SEQUENCE fills each row before moving to the next. For example, =SEQUENCE(3,2) fills 1 and 2 in the first row, 3 and 4 in the second, and 5 and 6 in the third.
Letting a cell set the count
Type a number into a cell, such as B1, and refer to it:
=SEQUENCE(B1)
Change B1 to 25 and the list grows to 25 numbers. Change it to 5 and the list shrinks. To start from a value in another cell, add it as the third argument, as in =SEQUENCE(B1, 1, A1, 1).
Numbering the rows of a list
To number the rows of a list, count the rows first and let SEQUENCE do the rest:
=SEQUENCE(ROWS(A2:A100))
The result runs from 1 up to the number of rows in A2:A100, so the numbers always match the size of the list.
Dates
Excel stores dates as numbers, so SEQUENCE works with dates too. Start with a date and use a step of 7 for weekly dates:
=SEQUENCE(4, 1, DATE(2027,1,4), 7)
This returns four dates a week apart, starting January 4, 2027. If the cells show plain numbers instead of dates, format them as dates.
Using SEQUENCE inside other formulas
SEQUENCE can feed other formulas. For example, multiplying a sequence by 10 gives a list of multiples:
=SEQUENCE(5)*10
This returns 10, 20, 30, 40 and 50. Any formula that accepts a list of numbers can take SEQUENCE in the same way.
Common problems
- #SPILL! appears when cells below the formula aren’t empty. Clear them, or see how to fix #spill error in excel.
- Numbers that don’t update. If you typed the numbers or dragged the fill handle, they won’t change when you alter a count. Put one SEQUENCE formula in a cell instead, so the count can be changed in one place.
Google Sheets
Google Sheets has SEQUENCE with the same arguments: =SEQUENCE(rows, columns, start, step). The examples in this article work in Sheets too, and the results spill in the same way.
To keep only some of the numbers, such as the even ones, filter a SEQUENCE result. The steps for how to use filter function in excel cover that approach.