Skip to main content

SEQUENCE function

The SEQUENCE function returns an array of sequential numbers, such as 1, 2, 3, 4.

Parts of a SEQUENCE function​

SEQUENCE(rows, columns, start, step)

PartDescription
rowsRequired. The number of rows to return
columnsOptional. The number of columns to return. If omitted, the returned array will have one column.
startOptional. The number to start the sequence at. If omitted, the sequence will start at 1.
stepOptional. The amount to increase/decrease each number in the sequence. If omitted, the sequence will increase by 1.

Sample formulas​

Example 1: SEQUENCE(2)

Example 2: SEQUENCE(2, 3)

Example 3: SEQUENCE(2, 3, 3, 2)

Example 4: SEQUENCE(2, 3, 10, -1)

Notes​

If columns is omitted, the resulting array will be a vertical list. If a horizontal list is needed, either specify rows as 1 and specify columns or transpose the vertical result.

Result for A1=SEQUENCE(2)

AB
11
22

Result for A1= SEQUENCE(2, 3)

ABC
1123
2456
3

Result for A1= SEQUENCE(2, 3, 3, 2)

ABC
1357
291113
3

Result for A1= SEQUENCE(2, 3, 10, -1)

ABC
11098
2765
3432
  • MUNIT: The MUNIT function returns a unit matrix of size dimension x dimension.
  • RANDARRAY: The RANDARRAY function generates an array of random numbers between 0 and 1.