Practice free

SEQUENCE function

SEQUENCE generates a grid of consecutive numbers, such as 1 to 12 or a series of dates, without typing them. It is a building block for many dynamic array formulas, and numbers fill across each row first.

Example

Read it as a sentence: make a list of 1 to 4, then add it up, which gives 10.

Practice this in the app

Syntax

SEQUENCE(rows, [columns], [start], [step])

Arguments in [square brackets] are optional.

rows (required)
How many rows.
columns (optional)
How many columns. Default 1.
start (optional)
First number. Default 1.
step (optional)
Amount added each time. Default 1.

Returns: A grid of consecutive numbers that spills.

One SEQUENCE formula can fill more than one cell. When the result has several values, they spill into the cells below or to the right of the formula.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=SEQUENCE(5) 1 5 rows
=SEQUENCE(3,2) 1 3x2
=SEQUENCE(1,4,10,-2) 10 Start 10 step -2
=SEQUENCE(3,1,7,0) 7 Step 0
=SEQUENCE(3,1,0,0.1) 0 Decimal step
=SEQUENCE(2.9) 1 Rows 2.9 truncates
=SEQUENCE(0) #CALC! Rows 0
=SEQUENCE(-1) #VALUE! Rows -1

Watch out for

  • Numbers fill across each row first, then down.
  • Spill range must be clear or you get #SPILL!.

Where it works

Excel
SEQUENCE arrived in Excel 2021. Older versions do not have it. Excel 2021 and later, plus 365.
Google Sheets
Same name, same behaviour for everyday use.

Part of Math and trig functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .