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( 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( is a column of five numbers and SEQUENCE( 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( 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)- Step 1: It starts at the date in
B1, Monday, Jan 4, 2027. - Step 2: Each row adds the step, 7 days, so every date is a Monday.
- Step 3: It stops after 8 rows, on Feb 22, 2027.
Common mistakes
=SEQUENCE(lists the dates across a row, because the first number is the rows. Put the count first for a column.1, 8, B1, 7) =SEQUENCE(counts up one day at a time, the default step. Give 7 for every week.8, 1, B1) =B1+starts a week late, because SEQUENCE starts at 1. Give B1 as the start instead.SEQUENCE( 8)* 7 =SEQUENCE(drifts away from the day of the month, since only some months have 30 days. Add months with EDATE.12, 1, F2, 30)
In short
=SEQUENCE(writes a grid of numbers, and rows come first.rows, columns, start, step) - 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
Premium4 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.
Have one? Sign in