Excel functions · Dynamic arrays

SEQUENCE function in Excel

SEQUENCE generates a list or grid of sequential numbers, such as 1 to 10, with the start and step you choose. =SEQUENCE(5) spills 1, 2, 3, 4, 5 down a column, and with a date as the start it builds a run of dates.

Last reviewed

Syntax

=SEQUENCE(rows, [columns], [start], [step])
rowsrequired
How many rows to fill.
columnsoptional
How many columns to fill. Defaults to 1.
startoptional
The first number. Defaults to 1.
stepoptional
The amount to add each time. Defaults to 1; can be negative.
  • The result spills: type the formula in one cell and it fills as many cells as it needs, and it updates when the data changes.
  • It fills across a row first, then moves down: =SEQUENCE(2,3) gives 1 2 3 on top and 4 5 6 below.
  • Dates are numbers in Excel, so a date start gives a date series. Format the cells as dates.

Which versions have SEQUENCE

Microsoft 365, Excel for the web, and Excel 2021 or later (Windows and Mac). Not in Excel 2019 or 2016.

SEQUENCE availability by Excel version
VersionHas it
Microsoft 365 (Windows and Mac)Yes
Excel for the webYes
Excel 2024Yes
Excel 2021Yes
Excel 2019No
Excel 2016No

Google Sheets

Google Sheets has SEQUENCE with the same four arguments.

Examples

  1. 1.Numbers 1 to 5

    =SEQUENCE(5)

    Result: Spills 1, 2, 3, 4, 5 down a column

    1
    2
    3
    4
    5

    Only rows is given, so start and step are both 1.

  2. 2.Across a row with a step

    =SEQUENCE(1, 4, 10, 10)

    Result: Spills 10, 20, 30, 40 across a row

    10203040

    One row, four columns, starting at 10 and adding 10.

  3. 3.A week of dates

    =SEQUENCE(7, 1, DATE(2026, 12, 1), 1)

    Result: Spills 2026-12-01 to 2026-12-07 (formatted as dates)

    2026-12-01
    2026-12-02
    2026-12-03
    2026-12-04
    2026-12-05
    2026-12-06
    2026-12-07

    The start is a date, so each step adds a day.

Common errors and fixes

SEQUENCE errors, causes and fixes
ErrorWhy it happensFix
#SPILL!The result needs more cells than are free: something is in the way, or the formula is inside an Excel table.Clear the cells below and to the right, or move the formula outside the table.
#NAME?Your Excel doesn't have dynamic array functions (Excel 2019 or older).Open the file in Microsoft 365, Excel for the web, or Excel 2021 or later.

Do it with GPTExcel

Skip writing SEQUENCE by hand

Upload your Excel or CSV file to Chat and ask in plain English. GPTExcel writes the formula for your file and your version of Excel or Google Sheets.

your-file.xlsx

Build a calendar sheet for December with one row per working day.

Done. I used SEQUENCE on your sheet and checked the results against your data.

your-file-updated.xlsxYour original stays unchanged
  • Written for your platform and version
  • Checked against your actual data
  • Newest functions looked up in official docs
Try it free Formula Generator

Free plan, no credit card.

SEQUENCE questions

How do I number rows automatically in Excel?
Use SEQUENCE with the row count of your data: =SEQUENCE(ROWS(A2:A9)) spills 1 to 8. Use COUNTA instead of ROWS if the list grows.
Can SEQUENCE count down?
Yes, use a negative step: =SEQUENCE(5, 1, 5, -1) spills 5, 4, 3, 2, 1.

Skip the formula hunt

Upload a spreadsheet and ask in plain English. Free plan, no credit card.

Start free