Skip to content

Number rows and list dates with SEQUENCE

Formulas that spill8 minPremium

Builds on Fill a range with one formula, and fix #SPILL! and Move by whole months with EDATE and EOMONTH.

An accounts assistant in Denver issues invoices in batches and sets up the payment dates of 12-month service contracts. Typing them by hand invites a skipped number or a wrong date, and one formula writes them all.

How it works

SEQUENCE(rows, [columns], [start], [step]) returns a grid of numbers: rows tall and columns wide, counting from start by step. Leave start or step out and it's 1. Rows come first, so SEQUENCE(5) is a column of five numbers and SEQUENCE(1,5) a row of five. A grid fills across each row before it moves down to the next.

Think of it as the fill handle written as a formula. It types 1, 2, 3 for you, and when the number of rows comes from a cell, the list grows and shrinks with that cell.

Excel counts dates in days, so a start date and a step of 7 give a weekly list. Months have different lengths, so for monthly dates hand the numbers to EDATE, which adds whole months: =EDATE(F2,SEQUENCE(12,1,0)) gives the date in F2 and the eleven monthly dates after it. Format the cells as dates, or they show as plain numbers.

Example

Weekly team meetings start on Monday, Jan 4, 2027, the date in B1.

=SEQUENCE(8,1,B1,7)
Lists 8 dates down from A4, starting with the date in B1 and adding 7 days each time.

  1. Step 1: It starts at the date in B1, Monday, Jan 4, 2027.
  2. Step 2: Each row adds the step, 7 days, so every date is a Monday.
  3. Step 3: It stops after 8 rows, on Feb 22, 2027.
SEQUENCE starts at the date in B1 and adds the step, 7 days, on each row until it has 8 rows. In A4, =SEQUENCE(8,1,B1,7) returns Mon 4 Jan 2027.

Common mistakes

  • =SEQUENCE(1,8,B1,7) lists the dates across a row, because the first number is the rows. Put the count first for a column.
  • =SEQUENCE(8,1,B1) counts up one day at a time, the default step. Give 7 for every week.
  • =B1+SEQUENCE(8)*7 starts a week late, because SEQUENCE starts at 1. Give B1 as the start instead.
  • =SEQUENCE(12,1,F2,30) drifts away from the day of the month, since only some months have 30 days. Add months with EDATE.

In short

  • =SEQUENCE(rows, columns, start, step) writes a grid of numbers, and rows come first.
  • A start date and a step of 7 make a weekly list. For monthly dates, give SEQUENCE's numbers to EDATE.
  • Take the count from a cell, and the list follows it.
  • Format the results as dates when they are dates.

Practice

Premium

4 exercises: 3 formulas and 1 quiz question.

Practice is part of Premium

Every lesson is free to read, and you can practice the free lessons without an account. This lesson's exercises are part of Premium, which you add to a free account.