What it does
=SEQUENCE(5) writes the numbers 1 to 5 down a column. The second argument is the number of columns; =SEQUENCE(3,4) fills an area of 3 rows by 4 columns, row by row. Without a start and step, the run starts at 1 and goes up by one.
Its real use is in combination. Adding SEQUENCE(6,1,0,7) to a date gives six weekly dates; used as the month inside DATE, it gives the same day of consecutive months. Tie the row count to a list with COUNTA and the numbers grow as the list grows.
In Excel 2019 and earlier the same job is done with a formula filled down, such as =ROW()-1 (ROW). To take only the first or last rows of an array, Microsoft 365 has TAKE.
Syntax
=SEQUENCE(rows, [columns], [start], [step])=SIRALI(satırlar; [sütunlar]; [başlangıç]; [adım])Arguments in square brackets are optional. English Excel separates arguments with commas (,) and uses a dot for decimals; Turkish Excel uses semicolons (;) and a decimal comma. Excel shows function names in its own language when it opens the file.
Arguments
| Argument | Required | Description |
|---|---|---|
rows | Required | The number of rows to generate. |
columns | Optional | The number of columns to generate; 1 if omitted. |
start | Optional | The first number of the run; 1 if omitted. It can be a date. |
step | Optional | The difference between each number and the previous one; 1 if omitted. A negative step counts down, and decimals are allowed. |
Examples
1Running numbers that grow with the list
The single formula in A2 produces as many numbers as there are filled cells in column B. The range is reserved down to B50, so items added later are counted too.
=SEQUENCE(COUNTA(B2:B50))| A | B | C | |
|---|---|---|---|
| 1 | No. | Item | Qty |
| 2 | 1 | Notebook | 40 |
| 3 | 2 | Pen | 120 |
| 4 | 3 | Binder | 25 |
| 5 | 4 | Eraser | 60 |
| 6 | 5 | Stapler | 8 |
- A2 (the result spills into A2:A6)
=SEQUENCE(COUNTA(B2:B50))
There are five items, so the numbers spill from A2 to A6, and A6 shows 5. Type a new item in B7 and the next number appears in A7 by itself.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
2Meeting dates one week apart
0, 7, 14 and so on are added to the first date in A2: start 0, step 7. The result spills six rows down from C2.
=A2+SEQUENCE(6,1,0,7)| A | B | C | |
|---|---|---|---|
| 1 | First Meeting | Meeting Dates | |
| 2 | 2-Nov-2026 | 2-Nov-2026 | |
| 3 | 9-Nov-2026 | ||
| 4 | 16-Nov-2026 | ||
| 5 | 23-Nov-2026 | ||
| 6 | 30-Nov-2026 | ||
| 7 | 7-Dec-2026 |
- C2 (the result spills into C2:C7)
=A2+SEQUENCE(6,1,0,7)
With a start of 0, the first date is 2 November itself, and the last meeting falls on 7-Dec-2026. Change A2 and the whole schedule moves.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
3Instalments due on the 15th of each month
A2 produces the instalment numbers and B2 the due dates: DATE takes the numbers 1 to 6 as the month and returns the 15th of each. Both formulas spill six rows.
=SEQUENCE(6)| A | B | |
|---|---|---|
| 1 | Instalment | Due Date |
| 2 | 1 | 15-Jan-2027 |
| 3 | 2 | 15-Feb-2027 |
| 4 | 3 | 15-Mar-2027 |
| 5 | 4 | 15-Apr-2027 |
| 6 | 5 | 15-May-2027 |
| 7 | 6 | 15-Jun-2027 |
- A2 (the result spills into A2:A7)
=SEQUENCE(6) - B2 (the result spills into B2:B7)
=DATE(2027,SEQUENCE(6),15)
The first instalment is due on 15-Jan-2027 and the sixth on 15-Jun-2027. Even with more than 12 instalments, month numbers such as 13 and 14 roll into the next year by themselves.
We recalculated this example in real Excel (Microsoft 365, 16.0) and compared the results: they match.
Common errors and fixes
- #SPILL!
Cause: A cell in the area the run spills into is not empty.
Fix: Clear the cells below and to the right of the formula.
- #CALC!
Cause: rows or columns came out as 0, for example because the counted list is empty.
Fix: Make sure the formula that gives the row count returns at least 1.
- Numbers instead of dates
Cause: A run of dates was generated but the cells show numbers such as 46328.
Fix: Apply a date format to the spill area.
Good to know
- For a countdown, use a negative step:
=SEQUENCE(5,1,5,-1)goes from 5 down to 1. - Put the formula in the cell where the run should start and keep the cells below empty; the run spills down from there.
In Nexell
Get Nexell to do it from a sentence
Add a due date column to the instalment list, one per month starting from 15 January 2027
Convert to tableBring your instalment list into the tool and type this. Nexell adds the due date column with real Excel date formulas and shows it in the preview; in the downloaded file, all due dates move when you change the first one.
Nexell uses AI to understand the request and builds the result with real Excel formulas; the formula may differ from the example on this page. You see a preview first and nothing changes until you press Apply; formulas stay live in the downloaded .xlsx file.
Free account · no card needed · 30 credits a month
Frequently asked questions
How do I number rows automatically with SEQUENCE?
Tie the row count to the number of filled cells: =SEQUENCE(COUNTA(B2:B100)). As new rows are typed in column B, the numbers grow by themselves. Put the formula in the first cell of the numbering; the cells below it must be empty.