Math & trig function

SEQUENCE function

Generates a spilled list or grid of sequential numbers with a chosen start and step.

Available in Microsoft 365, Excel 2021 and later, Excel for the web

Excel 2021 and laterWorks in Google Sheets

Syntax

SEQUENCE(rows, [columns], [start], [step])
ArgumentWhat it means
rowsRequiredNumber of rows to return.
columnsOptionalNumber of columns. Default 1.
startOptionalFirst number. Default 1.
stepOptionalAmount added each time. Default 1; can be negative or a decimal.

Returns: An array of numbers that spills into the neighbouring cells, filled row by row.

How SEQUENCE works

SEQUENCE writes a series of numbers for you: =SEQUENCE(10) spills 1 to 10 down a column, replacing the old habit of typing two numbers and dragging the fill handle. Because it is a formula, the list grows or shrinks automatically when the size argument comes from a calculation, such as =SEQUENCE(COUNTA(A:A)-1) for row numbers that follow a changing list.

With more arguments it builds grids and custom series. =SEQUENCE(3, 4) fills 3 rows × 4 columns with 1–12, going across each row before moving down. start and step control the values, so dates (which are numbers), invoice numbers, times or countdowns are all possible. Wrap it in other functions for calendars, schedules and repeated labels.

As a dynamic-array function it spills; the target cells must be empty or you get #SPILL!. Refer to the whole result with the spill operator, e.g. A2#.

Examples

1Numbers 1 to 5

A2fx=SEQUENCE(5)
A
1
21
32
43
54
65

Five rows, one column, starting at 1 with step 1.

2A 3 × 4 grid

A1fx=SEQUENCE(3, 4)
ABCD
11234
25678
39101112

The numbers run across each row first, then continue on the next row.

3Weekly meeting dates

A2fx=SEQUENCE(4, 1, DATE(2026,1,5), 7)
A
1
22026-01-05
32026-01-12
42026-01-19
52026-01-26

Start on Monday 5 January 2026 and add 7 days each time. Format the spill range as dates, otherwise you see serial numbers (46027…).

4Invoice numbers with a prefix

A2fx="INV-"&SEQUENCE(4, 1, 1001)
A
1
2INV-1001
3INV-1002
4INV-1003
5INV-1004

SEQUENCE creates 1001–1004 and the & joins the prefix to each number, giving text labels.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 17 KB

Common errors and how to fix them

ErrorWhy it happensFix
#SPILL!Something already occupies the spill area.Clear the cells or move the formula.
#VALUE!rows or columns is 0 or negative.Use positive sizes; wrap in IF to handle empty lists.
#NAME?Excel 2019 or older.Use ROW(A1:A5) style formulas or the fill handle.

Tips

  • Countdown: =SEQUENCE(5, 1, 5, -1) gives 5, 4, 3, 2, 1.
  • Fill down instead of across in a grid: =TRANSPOSE(SEQUENCE(4, 3)).
  • First day of each month: =DATE(2026, SEQUENCE(12), 1).
  • Every other row of a list: =INDEX(A2:A21, SEQUENCE(10, 1, 1, 2)).

Questions

How do I make SEQUENCE grow with my data?

Base rows on a count: =SEQUENCE(COUNTA(B2:B1000)). When names are added, the numbering extends automatically.

Can SEQUENCE return dates?

Yes. Use a date as start and days as step, then apply a date format to the spill range.

Can SEQUENCE create decimals?

Yes, a decimal step works: =SEQUENCE(5, 1, 0, 0.25) gives 0, 0.25, 0.5, 0.75, 1.

Google Sheets

SEQUENCE also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

SEQUENCE in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishSEKVENS
DutchREEKS
FinnishJONO
GermanSEQUENZ
HungarianSORSZÁMLISTA
ItalianSEQUENZA
Norwegian (Bokmål)SEKVENS
PolishSEKWENCJA
Portuguese (Brazil)SEQUÊNCIA
Portuguese (Portugal)SEQUÊNCIA
RussianПОСЛЕДОВ
SpanishSECUENCIA
SwedishSEKVENS
TurkishSIRALI

Recipes that use SEQUENCE