1. Home
  2. Functions
  3. Array
  4. SEQUENCE

SEQUENCE function

Returns a list of sequential numbers in an array of the given size.

Syntax

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

Arguments

ArgumentRequiredDescription
rowsRequiredNumber of rows
columnsOptionalNumber of columns (default 1)
startOptionalThe first number (default 1)
stepOptionalThe increment (default 1)

How to use SEQUENCE

When SEQUENCE returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

SEQUENCE takes 1 required argument and 3 optional arguments. Type =SEQUENCE( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=SEQUENCE(3)Result 3 by 1 array
Spilled result
A
11
22
33
=SEQUENCE(2, 3, 10, 5)Result 2 by 3 array
Spilled result
ABC
1101520
2253035
=SEQUENCE(0)Result #CALC!

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.