Quick Answer

SEQUENCE Function

Generates a sequence of numbers in an array.

✓ Excel✓ Google SheetsExcel Microsoft 365

Syntax

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

Parameters

ParameterDescriptionRequired
rowsThe number of rows in the result (must be a positive integer).Required
columnsThe number of columns in the result (defaults to 1).Optional
startThe first value in the sequence (defaults to 1).Optional
stepThe increment between values (defaults to 1; may be negative).Optional

Basic Example

Make a column of 1 through 5

=SEQUENCE(5)
Result1, 2, 3, 4, 5 (in a single column)

With only rows supplied, SEQUENCE returns a 5-row, 1-column array starting at 1, stepping by 1.

Advanced Examples

Example 1: A grid with a step

Build a 3-row by 4-column table starting at 10, counting by 5.

Supply rows, columns, start, and step

=SEQUENCE(3, 4, 10, 5)
Result: 10, 15, 20, 25 / 30, 35, 40, 45 / 50, 55, 60, 65 (3 rows, 4 columns)
The sequence starts at 10 and increments by 5 across the 12 cells.

Example 2: Counting down

A row from 100 down to 60.

Use a negative step

=SEQUENCE(1, 5, 100, -10)
Result: 100, 90, 80, 70, 60
A negative step produces a decreasing sequence.

How SEQUENCE Works

SEQUENCE generates a two-dimensional array of sequential numbers. rows and columns set the shape (columns defaults to 1), start is the first value (default 1), and step is the increment (default 1, and may be negative). The array spills into the sheet.

1
Set the shape
Decide rows and columns.
2
Set start and step
Optionally choose start value and increment.
3
Ensure spill space
Leave empty cells for the array.

Important Notes & Limitations

  • Microsoft 365 / Excel 2021+ only.

  • rows and columns must be positive integers; only step may be negative.

  • Spills, so it needs empty space below/right.

Common Errors & Fixes

#VALUE! (negative size)rows or columns is negative or non-integer.

Fix: Use positive integers; only step may be negative.

#SPILL!No room for the spilled array.

Fix: Clear the cells in the spill range.

Download Practice File

Practice SEQUENCE with Real Data

Download a sample CSV file with pre-populated data and practice exercises for the SEQUENCE function. Works in both Excel and Google Sheets.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Related Tutorials

Frequently Asked Questions

Is SEQUENCE in Google Sheets?
Yes, SEQUENCE is natively supported in Google Sheets.
Can step be negative?
Yes, e.g. start 10 with step -1 counts downward.
How do I make a row vector?
Set columns greater than 1 and rows equal to 1.