ShareYourGroupShareYourGroupExcel Formulas

Dynamic arrays functions

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])
ArgumentWhat it is
rowsHow many rows of numbers to make.
columnsHow many columns. 1 if left out.
startThe first number. 1 if left out.
stepHow 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.

Sample sheet: A small price list with item codes. The table is sorted by code.
ABCDE
1CodeItemCategoryPriceStock
2A101Basmati Rice 5 kgGrocery65040
3A102Toor Dal 1 kgGrocery16075
4B201NotebookStationery60300
5B202Ball PenStationery100
6C301LED BulbElectronics110200
7C302Power BankElectronics129918
8D401Steel BottleHome45055

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.

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.

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

In Google Sheets

SEQUENCE is available in Google Sheets with the same four arguments.

Related functions

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.