formulastreak

Dynamic arrays function

SEQUENCE function in Google Sheets and Excel

SEQUENCE returns a list or grid of numbers: 1 to 12, every second number, or numbers starting where you choose.

Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet

Syntax

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

Arguments in [brackets] are optional. Google Sheets writes it SEQUENCE(rows, columns, start, step).

Example

=DATE(B1,SEQUENCE(12),1) reads: Make the numbers 1 to 12 and turn each into the first day of that month of the year in B1.

Planning calendar · edit D2 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultD2 = Jan 2026
ABCDEF
1Year2026Month
2Jan 2026
3HolidaysFeb 2026
41 Jan 2026Mar 2026
53 Apr 2026Apr 2026
66 Apr 2026May 2026
71 May 2026Jun 2026
825 Dec 2026Jul 2026
9Aug 2026
10Sep 2026
11Oct 2026
12Nov 2026
13Dec 2026

D2 shows Jan 2026 and the list spills down to Dec 2026 in D13.

How the spreadsheet calculates it

Builds the date with year B1, month the result of SEQUENCE (step 1) and day 1.

  1. 1. SEQUENCE: Makes a list of 12 number(s), starting at 1 and going up by 1. It spills.
    • rows = `12`: how many numbers to make, counting from 1
  2. 2. DATE: Builds the date with year B1, month the result of step 1 and day 1.
    • year = `B1`: a four-digit year
    • month = the result of step 1: 1 to 12 (bigger numbers roll into the next year)
    • day = `1`: the day of the month

More SEQUENCE examples

  • =SEQUENCE(12)The numbers 1 to 12 in a column.
  • =DATE(2026,SEQUENCE(12),1)The first day of every month in 2026.
  • =SEQUENCE(1,5,0,10)0, 10, 20, 30, 40 across a row.
  • =SEQUENCE(7)+A1-1Seven days starting from the date in A1.

Paste any of these into the formula explainer to see it step by step.

Tips

  • Leave enough empty cells for the whole result to spill.
  • Use step to count by any amount, including negative steps to count down.
  • Combine it with other functions (DATE, INDEX) to turn positions into dates or items.
  • Use columns to make a grid: SEQUENCE(3, 4) fills 3 rows by 4 columns.

What SEQUENCE is used for

Numbering rows, building calendars and month lists, generating test data, and feeding other dynamic-array formulas a list of positions.

Arguments

ArgumentRequiredWhat it is
rowsYesHow many rows of numbers.
columnsNoHow many columns; 1 by default.
startNoThe first number; 1 by default.
stepNoHow much each number adds; 1 by default, and it can be negative.

Common mistakes

  • Something typed below the formula: #SPILL!.

  • Typing in the cells the list needs (#SPILL!).

  • Using it in Excel 2019 or older, where it doesn't exist.

In Google Sheets

Google Sheets has SEQUENCE with the same four arguments.

Errors you may see with SEQUENCE

  • #SPILL!: Something blocks the list.
  • #NAME?: The file is open in Excel 2019 or older.

Questions

How do I make a list of dates?

Add a SEQUENCE to a start date, start + SEQUENCE(7) - 1 for a week, or build months with DATE(year, SEQUENCE(12), 1) as in the example.

How do I refer to the whole list?

In Excel, with the spill operator: D2#. Google Sheets has no # operator.

How do I number rows that grow?

Combine it with COUNTA: SEQUENCE(COUNTA(A2:A100)) numbers as many rows as there are entries.

Can SEQUENCE make decimals?

Yes: start and step can be any number, so SEQUENCE(5, 1, 0, 0.25) gives 0, 0.25, 0.5, 0.75 and 1.

Sources

Official documentation the facts on this page were checked against.

Practise SEQUENCE on a live sheet

Lesson 40, SEQUENCE and spill ranges (Unit 11, Dynamic arrays), has 5 graded exercises, checked instantly, with steps and hints when you're stuck. Pro