SEQUENCE function in Excel
SEQUENCE returns a list of numbers in order, such as 1 to 10, in rows and columns of your choosing.
SEQUENCE makes numbered lists: 1, 2, 3, or 10, 20, 30, or a run of dates. It replaces typing two numbers and dragging the fill handle, and because it is a formula, the list can change length by itself. It is available in Excel 2021 and Microsoft 365.
Syntax
=SEQUENCE(rows, [columns], [start], [step])| Argument | What it is |
|---|---|
rows | How many rows of numbers to make. |
columns | How many columns. 1 if left out. |
start | The first number. 1 if left out. |
step | How much to add each time. 1 if left out. |
Examples
Each result below is what Excel itself showed for the formula on the sample sheet.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Code | Item | Category | Price | Stock |
| 2 | A101 | Basmati Rice 5 kg | Grocery | 650 | 40 |
| 3 | A102 | Toor Dal 1 kg | Grocery | 160 | 75 |
| 4 | B201 | Notebook | Stationery | 60 | 300 |
| 5 | B202 | Ball Pen | Stationery | 10 | 0 |
| 6 | C301 | LED Bulb | Electronics | 110 | 200 |
| 7 | C302 | Power Bank | Electronics | 1299 | 18 |
| 8 | D401 | Steel Bottle | Home | 450 | 55 |
=SEQUENCE(5)Result:1 2 3 4 5 The numbers 1 to 5, one under another.
=SEQUENCE(1,5)Result:1 2 3 4 5 One row and five columns: the same numbers across.
=SEQUENCE(3,4)Result:1 2 3 4 5 6 7 8 9 10 11 12 Three rows of four: the numbers fill along each row, then move down.
=SEQUENCE(5,1,10,10)Result:10 20 30 40 50 Five numbers starting at 10 and going up in tens.
=SEQUENCE(4,1,100,-25)Result:100 75 50 25 A negative step counts down.
=SEQUENCE(COUNTA(B2:B8))Result:1 2 3 4 5 6 7 Serial numbers for a list: as many as there are items, growing as items are added.
=SEQUENCE(6,1,DATE(2026,11,1),7)Result:Sun 01-Nov-2026 Sun 08-Nov-2026 Sun 15-Nov-2026 Sun 22-Nov-2026 Sun 29-Nov-2026 Sun 06-Dec-2026 Six dates a week apart.
=EDATE(DATE(2026,4,1),SEQUENCE(4,1,0))Result:Apr-2026 May-2026 Jun-2026 Jul-2026 The first day of four months in a row: SEQUENCE supplies 0, 1, 2 and 3 months to add.
=LARGE(D2:D8,SEQUENCE(3))Result:1299 650 450 The three highest prices, by handing LARGE the positions 1, 2 and 3.
How it works
The first argument says how many rows of numbers you want. The others are optional: how many columns, where to start, and what to add each time. The numbers spill from the formula's cell.
With more than one column, the numbers run along the first row, then the second, as when reading a page.
Serial numbers that keep themselves right
A serial-number column typed by hand has to be fixed whenever a row is added or deleted. =SEQUENCE(COUNTA(B2:B100)) produces exactly as many numbers as there are entries. Add an item and a number appears beside it.
Dates
A date is a number, so SEQUENCE makes dates too. Format the cells as dates.
- Every day of a month:
=SEQUENCE(30, 1, DATE(2026,11,1)) - Every Monday for ten weeks:
=SEQUENCE(10, 1, DATE(2026,11,2), 7) - A calendar grid:
=SEQUENCE(6, 7, start_date)gives six weeks of seven days.
Months cannot be made with a fixed step, since they differ in length. Hand SEQUENCE to EDATE instead, as the eighth example does: =EDATE(start, SEQUENCE(12,1,0)) gives twelve month starts. This is the quick way to lay out an EMI or rent schedule.
Feeding other functions
Many functions take a position number: the nth largest, the nth character, the nth row. Give them SEQUENCE and they return all the positions at once.
=LARGE(range, SEQUENCE(5))is the top five.=INDEX(SORT(range), SEQUENCE(10))is the first ten rows of a sorted list.=MID(A1, SEQUENCE(LEN(A1)), 1)splits a text into single characters.
Tables of results
Because SEQUENCE can run across as well as down, two of them make a grid. =SEQUENCE(10)*SEQUENCE(1,10) is a ten by ten multiplication table from a single formula: a column of 1 to 10 multiplied by a row of 1 to 10.
Repeating patterns
With MOD, a sequence becomes a cycle. =MOD(SEQUENCE(12)-1,3)+1 gives 1, 2, 3, 1, 2, 3 and so on, which assigns twelve people to three teams in turn.
Counting down, and decimals
A negative step counts downwards. The step can be a fraction too: =SEQUENCE(5,1,0,0.25) gives 0, 0.25, 0.5, 0.75 and 1.
Before Excel 2021
Older versions have no SEQUENCE. The usual substitutes are =ROW()-1 copied down a column, which gives 1, 2, 3 from row 2, or =ROWS($1:1), which is not upset when rows are inserted above.
Common mistakes
#SPILL!when cells in the way are not empty.#NAME?in Excel 2019 and earlier.#CALC!when the number of rows works out to zero, for example when counting an empty list.- Confusing the order of the arguments: rows, columns, start, step. To get a single column starting at 100, the columns argument still needs its 1:
=SEQUENCE(5,1,100). - Dates showing as five-digit numbers until the cells are formatted.
In Google Sheets
SEQUENCE is available in Google Sheets with the same four arguments.
Related functions
- SORT and SORTBYDynamic arrays
- FILTERDynamic arrays
- UNIQUEDynamic arrays
- LARGE and SMALLStatistical
- EDATE and EOMONTHDate and time
Every result on this page was calculated in Microsoft Excel (version 16.0, build 20326) on 12 November 2026, not typed by hand.
This is an independent help site. It is not connected with or approved by Microsoft. Excel and Microsoft 365 are trademarks of Microsoft Corporation, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.