<< Go back to all functions

SEQUENCE

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

Function Syntax and Parameters

Syntax: SEQUENCE(rows, columns, start, step)

Parameters:

  • rows: The number of rows in the sequence.
  • columns: The number of columns in the sequence (optional, default value is 1).
  • start: [Optional] The starting value of the sequence (optional, default value is 1).
  • step: [Optional] The increment between each value in the sequence (optional, default value is 1).

Step-by-Step Tutorial

  1. Creating a sequence of numbers in a single column:

    • Example: =SEQUENCE(5)
    • Result: [1, 2, 3, 4, 5]
  2. Creating a sequence of numbers in multiple rows and columns:

    • Example: =SEQUENCE(3, 2)
    • Result:
      [
        [1, 2],
        [3, 4],
        [5, 6]
      ]
      

Use Cases and Scenarios

  1. Data Generation: Generate a series of numbers for testing or simulation purposes.
  2. Array Manipulation: Create a sequence of indices or positions for array operations.

Related Functions

  • ROW: Returns the row number of a specified cell or range.
  • COLUMN: Returns the column number of a specified cell or range.

Related Articles