SEQUENCE

Formulas / SEQUENCE
Generate a list of numbers in an array.
=SEQUENCE(rows, [columns], [start], [step])
  • rows - the number of rows to return
  • columns - [OPTIONAL] the number of columns to return
  • start - [OPTIONAL] the first number in the sequence
  • step - [OPTIONAL] the amount to increment each value in the array

Examples

  • =SEQUENCE(5,5,10,5)

    This returns an array of sequential numbers with 5 rows by 5 columns starting at 10 and incrementing by 5. The result is 25 numbers starting at 10 and ending at 110.

  • =SEQUENCE(2,2,-8,2)

    This returns an array of sequential numbers with 2 rows by 2 columns starting at -8 and incrementing by 2. The result is 4 numbers starting at -8 and ending at -4.

  • =SEQUENCE(3,3,0,2)

    This returns an array of sequential numbers with 3 rows by 3 columns starting at 0 and incrementing by 2. The result is 9 numbers starting at 0 and ending at 16.

  • =SEQUENCE(7,4,5,1)

    This returns an array of sequential numbers with 7 rows by 4 columns starting at 5 and incrementing by 1. The result is 28 numbers starting at 5 and ending at 32.

  • =SEQUENCE(4,6,-1,.5)

    This returns an array of sequential numbers with 4 rows by 6 columns starting at -1 and incrementing by 0.5. The result is 24 numbers starting at -1 and ending at 8.5.

Summary

The SEQUENCE function returns an array of numbers in sequence, with arguments for rows (required), columns (optional), start (optional), and step (optional). It is a useful tool for quickly generating sequences of numbers.

  • The SEQUENCE function produces a one-dimensional or two-dimensional array of sequential numbers. The rows and columns arguments determine how many rows and columns should be returned in the output.
  • The start argument determines the starting point of the numeric sequence, and the step argument determines the increment between each value.


Frequently Asked Questions

What is the SEQUENCE function?
The SEQUENCE function returns a list of numbers in an array.
What type of array does the SEQUENCE function return?
The SEQUENCE function returns an array.
Can the SEQUENCE function return an array that spills?
Yes, the SEQUENCE function can return an array that spills if it is the final formula result.
Can the SEQUENCE function return an array that dynamically resizes with data in a table?
Yes, the SEQUENCE function can return an array that dynamically resizes with data in a table.
What conditions must be met for the SEQUENCE function to work?
The SEQUENCE function is supported only when both workbooks are open.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV