Home > Formulas > Math Trig > SEQUENCE Excel SEQUENCE Function Examples

Use the new Excel SEQUENCE function to quickly create a list of numbers on a worksheet. The list can be a single row or column, or in multiple rows and columns, like the dates for a 4week calendar.
With SEQUENCE, you can set a specific starting number for your sequence, and the interval between numbers.
For example:
The examples and tips below will show you how to get started, and how to get the most out of this powerful function.
SEQUENCE is available in Excel 365 or Excel 2021 or later, where dynamic arrays are supported.
The SEQUENCE function has the following syntax for its arguments, with one required argument, and 3 optional arguments:
The 4 arguments are:
Note: For the Start and Step arguments, you can use whole numbers or decimal numbers. Positive numbers, zero, and negative numbers are allowed.
In the 3 examples below, the formulas return a list of sequential numbers, starting with 1, and ending with 5
With just one argument in the SEQUENCE function, you can create a simple list of numbers.
=SEQUENCE(5)
The formula result is a vertical array of sequential numbers, from 1 to 5, in 5 rows, down 1 column.
With two arguments in the SEQUENCE function, you can create a horizontal list of numbers, across multiple columns.
=SEQUENCE(1, 5)
The formula result is a horizontal list of numbers, from 1 to 5. The sequential list spills into a range of cells with 1 row, across 5 columns.
For the arguments in the SEQUENCE function, you can use cell references, instead of typing the numbers into the formula.
In the screen shot below, a number is typed in cell D6, and the two SEQUENCE formulas refer to that cell.
Vertical List =SEQUENCE(D6) Horizontal List =SEQUENCE(1, D6)
When a different number is entered in cell D6, both number lists update automatically
With the following SEQUENCE formula, the result is a table of numbers, with 3 rows and 5 columns. The starting number is entered in cell B2, and the step value is entered in cell C2.
Here is the formula in cell B4, to create the table of numbers:
=SEQUENCE(4,5,B2,C2)
For example, if you want to practise counting by sixes, type a 6 as the start argument, and another 6 as the step argument.
Tip: For numbers in descending order, use a negative number as the Step value.
In the following example, the SEQUENCE formula result is a 4week calendar, starting with the current date, which is created by the TODAY function.
Here is the calendar formula in cell B4, to create the calendar dates:
=SEQUENCE(4,7,TODAY())
I've formatted the calendar cells to show the day number, with a 3letter month code, so it's easier to read.
Note: The calendar, and the weekday headings, will update each day, when you open the workbook, to start with the current date.
The TEXT formula, in cell B3, is an old Excel function, not one of the new functions that spill. However, because the formula refers to a 7cell range, the TEXT function acts like a dynamic array function, and automatically spills across all 7 columns, to show the weekday names, in a 3letter format (ddd).
=SEQUENCE(7, 1, 15, 3)
Here's another example of how you can use the SEQUENCE function with other Excel functions.
In the screen shot below, I've added two formulas at the top of the calendar worksheet, in cells F1 and H1. These formulas show the calendar's start date and end date, formatted as dmmm
Here is the start date formula, in cell F1, which combines the Excel MIN function with SEQUENCE, to return the earliest date in the 4week calendar:
=MIN(SEQUENCE(4,7,TODAY()))
And here is the end date formula, in cell FH, which combines the Excel MAX function with SEQUENCE, to return the latest date in the 4week calendar:
=MAX(SEQUENCE(4,7,TODAY()))
If you want to go beyond the basics, take a look at the following SEQUENCE function examples.
How many items can you remove every day, to declutter your home or office? This declutter schedule workbook calculates a running total per week, and over multiple weeks.
You could use this technique for other plans too, such as minutes per day that you want to practise a new skill.
See how you can make a printable Excel calendar, based on a few short formulas, with SEQUENCE creating the dates. Change the year or month number, to update the calendar, with that month's holidays highlighted. Stepbystep video and written steps.
There are written steps, a stepbystep video, and a completed Excel workbook that you can download.
On the TEXTJOIN function page, I used SEQUENCE in a formula that extracts just the numbers, from a mixed string of text and numbers. (see Example 6 on that page).
Here is the formula in cell B2, which was copied down to cell B6:
There are full details for this formula on the TEXTJOIN function page.
SEQUENCE Get Started: Click here to download the sample file for the SEQUENCE examples. For Excel 2019 or 365. The zipped file is in xlsx format, and does not contain macros.
Weekly Declutter Schedule  Click here to download the Weekly Declutter Schedule sample file. Has examples for Excel 2019 or 365 (Schedule A), and for all versions of Excel (Schedule B). The zipped file is in xlsx format, and does not contain macros.
Last updated: March 30, 2024 2:45 PM