Skip to content

Excel function · Math

Excel SEQUENCE function

SEQUENCE produces consecutive numbers across as many rows and columns as you ask for: month numbers from 1 to 12, dates a week apart. It is available in Microsoft 365 and Excel 2021.

In Turkish Excel: SIRALI

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

English Excel=SEQUENCE(rows, [columns], [start], [step])
Turkish Excel=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

ArgumentRequiredDescription
rowsRequiredThe number of rows to generate.
columnsOptionalThe number of columns to generate; 1 if omitted.
startOptionalThe first number of the run; 1 if omitted. It can be a date.
stepOptionalThe 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.

A2fx=SEQUENCE(COUNTA(B2:B50))
Running numbers that grow with the list: example table
ABC
1No.ItemQty
21Notebook40
32Pen120
43Binder25
54Eraser60
65Stapler8
  • 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.

C2fx=A2+SEQUENCE(6,1,0,7)
Meeting dates one week apart: example table
ABC
1First MeetingMeeting Dates
22-Nov-20262-Nov-2026
39-Nov-2026
416-Nov-2026
523-Nov-2026
630-Nov-2026
77-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.

A2fx=SEQUENCE(6)
Instalments due on the 15th of each month: example table
AB
1InstalmentDue Date
2115-Jan-2027
3215-Feb-2027
4315-Mar-2027
5415-Apr-2027
6515-May-2027
7615-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

Type this in Nexell

Add a due date column to the instalment list, one per month starting from 15 January 2027

Convert to table

Bring 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.

Related functions

All math functions →

Stop memorising formulas. Describe them.

Bring your table into the tool and say what you need; Nexell builds the formula and shows it in a preview.

Try it free