What SEQUENCE does

SEQUENCE returns a list of numbers that go up by a fixed step, in as many rows and columns as you ask for. =SEQUENCE(6,1,1001) numbers six support tickets from 1001 to 1006 down a column. Change one argument and the whole list changes with it.

Its four arguments are the rows, the columns, the first number and the step, and only the rows are required. A grid fills across each row before it moves down to the next. Excel stores a date as a count of days, so a date as the start gives a list of dates: one a day with the default step, one a week with a step of 7.

The numbers spill from the formula’s cell into the cells below and to the right. A value typed in that space blocks them, and the formula shows #SPILL!.

Syntax

=SEQUENCE(rows, [columns], [start], [step])
Arguments in square brackets are optional; the rest are required.
rowsRequired
How many rows to fill, such as 6, or a cell that holds the number.
columnsOptional
How many columns to fill. Left out, it's 1, a single column.
startOptional
The first number, such as 1001, or a date. Left out, the list starts at 1.
stepOptional
How much each number goes up by, such as 7 for dates a week apart. A negative step counts down. Left out, it's 1.

Example: number a batch of tickets

A service desk logs six new tickets and numbers them from 1001. The formula in A2 fills the numbers down beside the customers.

Six rows, one column, starting at 1001. The step is left out, so each number is one more than the last. In A2, =SEQUENCE(6,1,1001) returns 1001.

To number however many rows the list has, take the count from the list itself: =SEQUENCE(COUNTA(B2:B100)) writes one number for each filled cell in column B, and adds another when a customer is added below.

Example: a week of dates

A daily sales log needs the seven dates of the week that starts on the date in B1. The cells A4:A10 have a date format, so the numbers SEQUENCE returns show as dates.

The start is the date in B1, and the default step of 1 adds one day on each row. In A4, =SEQUENCE(7,1,B1) returns Mon 1 Mar 2027.

Type a new date in B1 and the whole week moves. For dates a week apart, give 7 as the step: =SEQUENCE(8,1,B1,7) lists eight Mondays when B1 is a Monday.

Across a row, or as a grid

The second argument spreads the numbers across columns. =SEQUENCE(1,12) writes 1 to 12 along a row, for month numbers across the top of a report. =SEQUENCE(3,4) fills three rows of four: 1 to 4 on the first row, 5 to 8 on the second and 9 to 12 on the third.

Monthly dates with EDATE

Months have different lengths, so a step of 30 days drifts away from the day of the month. Give SEQUENCE’s numbers to EDATE, which adds whole months: =EDATE(B1,SEQUENCE(12,1,0)) returns the date in B1 and the same day in each of the next eleven months. The 0 as the start makes the first date B1 itself.

Common mistakes

  • =SEQUENCE(1,7,B1) lists the week across a row, because the first argument is the number of rows. Put the count first for a column.
  • Dates that show as numbers such as 46447 only need a date format. Format the cells the list fills, A4:A10 above.
  • =SEQUENCE(12,1,B1,30) doesn’t give monthly dates: after a few months the day of the month has moved. Use EDATE with SEQUENCE.
  • An entry in the cells the list needs stops it, and the formula shows #SPILL!. Clear the cells below the formula.
  • SEQUENCE isn’t in Excel 2019 or earlier, where the formula shows #NAME?. There, type the first two numbers and drag the fill handle, or fill =ROW(A1) down a column.

Frequently asked questions

How do I create a sequence of dates in Excel?

Give SEQUENCE a start date: =SEQUENCE(7,1,B1) lists seven days from the date in B1, and =SEQUENCE(8,1,B1,7) lists eight dates a week apart. Format the cells as dates. For monthly dates, use =EDATE(B1,SEQUENCE(12,1,0)).

How do I number rows automatically in Excel?

Count the filled rows inside SEQUENCE: =SEQUENCE(COUNTA(B2:B100)) writes 1, 2, 3 and so on for each entry in column B, and keeps up as entries are added.

Can SEQUENCE count down?

Yes, with a negative step: =SEQUENCE(5,1,10,-1) returns 10, 9, 8, 7 and 6.

How do I fill numbers across a row with SEQUENCE?

Ask for one row and several columns: =SEQUENCE(1,12) writes 1 to 12 across twelve columns.

Does SEQUENCE work in Excel 2016 or 2019?

No. SEQUENCE is in Microsoft 365, Excel for the web, and Excel 2021 or later. In older versions, drag the fill handle from the first two numbers, or use Home > Fill > Series.