Excel SEQUENCE function: generate numbers, dates and grids automatically
Use Excel SEQUENCE to create row numbers, stepped series and dates in one formula: rows, columns, start, step, auto-numbering and common traps.
A list needs a “No.” column, a loan schedule needs months 1 to 36, a course needs weekly lesson dates… Usually you drag the fill handle — and when the list grows or shrinks, you drag again.
SEQUENCE builds such a series with one formula: how many rows, how many columns, where to start and what step to use. The result spills into neighbouring cells and rebuilds instantly when an argument changes.
The function itself is simple, but combined with others it becomes powerful: auto-numbering, calendars, top-N reports. Available only in Excel 2021 and Microsoft 365.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | No. | Employee | Department | |
| 2 | 1 | Aziz | Sales | |
| 3 | 2 | Dilnoza | Accounting | |
| 4 | 3 | Javohir | Sales | |
| 5 | 4 | Madina | Warehouse | |
| 6 | 5 | Sardor | Logistics | |
| 7 |
Syntax
=ПОСЛЕДОВ(rows; [columns]; [start]; [step])
- rows — how many rows (required).
- columns — how many columns. Omitted means 1.
- start — the first number. Omitted means 1.
- step — how much each next number grows. Omitted means 1. Negative counts down; decimals work too (0.5).
Examples: =ПОСЛЕДОВ(10) — 1…10 downwards; =ПОСЛЕДОВ(1;12) — 1…12 to the right; =ПОСЛЕДОВ(5;1;100;-10) — 100, 90, 80, 70, 60.
Adding row numbers
1
Select the cell where the numbers start (A2). A3:A6 below must be empty — the result spills into them.
2
Click Формулы → Математические → SEQUENCE.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | No. | Employee | ||
| 2 | Aziz | |||
| 3 | Dilnoza | |||
| 4 | Javohir | |||
| 5 |
3
Enter 5 in Rows, leave the rest empty and click OK. Or simply type =ПОСЛЕДОВ(5) in the cell and press Enter.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | No. | Employee | ||
| 2 | 1 | Aziz | ||
| 3 | 2 | Dilnoza | ||
| 4 | 3 | Javohir | ||
| 5 | 4 | Madina | ||
| 6 | 5 | Sardor | ||
| 7 |
4
The result spilled into A2:A6. Select A4 and the formula bar shows the formula greyed out — it’s a spilled value and can’t be edited on its own.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 1 | 2 | 3 | 41 | |
| 2 | 52 | 6 | 7 | 8 | |
| 3 | 9 | 10 | 11 | 12 | |
| 4 | |||||
| 5 |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Month | Save | ||
| 2 | 1 | 500 000 | ||
| 3 | 2 | 600 000 | ||
| 4 | 3 | 700 000 | ||
| 5 | 4 | 800 000 | ||
| 6 | 5 | 900 000 | ||
| 7 | 6 | 1 000 000 | ||
| 8 | Total | 4 500 000 | ||
| 9 |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Start: | 03.02.2025 | ||
| 2 | ||||
| 3 | Lesson | Date | ||
| 4 | 1 | 03.02.2025 | ||
| 5 | 2 | 10.02.2025 | ||
| 6 | 3 | 17.02.2025 | ||
| 7 | 4 | 24.02.2025 | ||
| 8 | 5 | 03.03.2025 | ||
| 9 |
Pro level: self-extending numbering and more tricks
- Automatic No.
=ПОСЛЕДОВ(СЧЁТЗ(B2:B100))— as many numbers as there are names in column B. Add a name and a number appears; delete one and it disappears. Sorting or deleting rows never makes the numbers jump. - Month starts.
=ДАТАМЕС(ДАТА(2025;1;1);ПОСЛЕДОВ(12;1;0))— the 12 months of 2025; for a table header use=ДАТАМЕС(ДАТА(2025;1;1);ПОСЛЕДОВ(1;12;0)). - A calendar.
=ПОСЛЕДОВ(6;7;B1-ДЕНЬНЕД(B1;2)+1)— a 6×7 calendar starting from the Monday of the week containing the date in B1 (with a date format). - Every n-th row.
=ИНДЕКС(A2:A100;ПОСЛЕДОВ(10;1;1;2))— values from rows 1, 3, 5… - Top N.
=ИНДЕКС(СОРТ(A2:B100;2;-1);ПОСЛЕДОВ(5);{1;2})— the best five. - Test data. Together with
=RANDARRAY(10;1;100000;900000;ИСТИНА)you get a table of random amounts for practice.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | No. | Customer | ||
| 2 | 1 | Aziz | ||
| 3 | 2 | Dilnoza | ||
| 4 | 3 | Javohir | ||
| 5 | 4 | Madina | ||
| 6 | 1 | |||
| 7 | ||||
| 8 |
Try it in the simulator
Type =ПОСЛЕДОВ(5) in A2 to number the employees. Then type =ПОСЛЕДОВ(3;3;10;10) in D2 and see in which order the result fills (10, 20, 30 in the first row).
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | No. | Employee | Grid | |||||||||||||||||||||
| 2 | Aziz | |||||||||||||||||||||||
| 3 | Dilnoza | |||||||||||||||||||||||
| 4 | Javohir | |||||||||||||||||||||||
| 5 | Madina | |||||||||||||||||||||||
| 6 | Sardor | |||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.