Math & Trig
SEQUENCE Function in Excel
Generates a list of sequential numbers in an array.
Syntax
- =SEQUENCE(rows, [columns], [start], [step])
Arguments
- rows (required): Number of rows to return
- columns (optional): Number of columns (default 1)
- start (optional): Starting number (default 1)
- step (optional): Increment (default 1)
Examples
- =SEQUENCE(5) - Numbers 1-5 - Result: 1,2,3,4,5
- =SEQUENCE(3, 3, 0, 2) - 3x3 even numbers - Result: 0,2,4,6,8,10,12,14,16
Excel SEQUENCE function documentation
- SEQUENCE generates an array of sequential numbers in rows, columns, or a 2D grid.
- Syntax: =SEQUENCE(rows, [columns], [start], [step]). Microsoft 365 dynamic array function.
- Replaces manual fill-down for period counters, index columns, and amortization row numbers.
- Related: [ROW](/functions/row/), [LET](/functions/let/), [LAMBDA](/functions/lambda/), [MAP](/functions/map/).
SEQUENCE syntax and arguments
- rows (required): how many rows in the spilled grid.
- columns (optional): default 1 — set >1 for 2D sequence tables.
- start (optional): first number — default 1; use 0 for zero-based indexes.
- step (optional): increment — default 1; use -1 for countdown sequences.
Step-by-step: month counter for 12-row model
- Step 1 — Need periods 1–12 in column D without manual typing.
- Step 2 — =SEQUENCE(12) spills 1 through 12.
- Step 3 — Calendar months: =SEQUENCE(12, 1, 1, 1) with label column =EDATE(start, D2-1).
- Step 4 — Pair with [PMT](/functions/pmt/) amortization schedules.
- Step 5 — Lock spill destination — clear blocked cells below.
SEQUENCE vs manual fill vs ROW trick
- SEQUENCE — one formula; parametric length from cell =SEQUENCE(B1).
- Fill handle — manual; breaks when row count changes.
- =ROW(A1:A12)-ROW(A1)+1 — legacy array; SEQUENCE is clearer in M365.
- Combine: =SEQUENCE(ROWS(data)) matches data height dynamically.
Worked examples to copy
- 1 to N: =SEQUENCE(24) for 24 periods.
- Zero-based index: =SEQUENCE(10, 1, 0, 1).
- 2D grid: =SEQUENCE(5, 4) creates 5×4 numbered matrix.
- Dynamic N from cell: =SEQUENCE(A1) when A1 holds row count.
People also ask
- SEQUENCE Excel version? — Microsoft 365 / Excel 2021 dynamic arrays.
- SEQUENCE with step 2? — =SEQUENCE(5, 1, 10, 2) → 10,12,14,16,18.
- SEQUENCE replace row numbers? — Yes for model period indexes.
- SEQUENCE #SPILL!? — Destination range not empty.
Common errors
- Requires Excel 365 or Excel 2021
Use cases
- Generate number series
- Create arrays
- Dynamic ranges
Frequently asked questions
- How do I generate a list of dates? Use SEQUENCE with a start date: =SEQUENCE(30, 1, DATE(2024,1,1), 1) generates 30 consecutive dates starting Jan 1, 2024. For weekdays only, combine with WORKDAY: =WORKDAY(DATE(2024,1,1)-1, SEQUENCE(20)).
- How do I create a multiplication table? Use =SEQUENCE(10, 1) * SEQUENCE(1, 10) to create a 10x10 multiplication table. The first SEQUENCE creates rows 1-10, the second creates columns 1-10, and multiplying them gives the product at each intersection.
- How do I generate a countdown or reverse sequence? Use negative step: =SEQUENCE(10, 1, 10, -1) counts down from 10 to 1. Or =SEQUENCE(5, 1, 100, -10) gives 100, 90, 80, 70, 60. The step parameter controls direction and increment.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.
When to use SEQUENCE
- Generate number series — common Math & Trig scenario for SEQUENCE.
- Create arrays — common Math & Trig scenario for SEQUENCE.
- Dynamic ranges — common Math & Trig scenario for SEQUENCE.
SEQUENCE in the Math & Trig category
- Browse all Math & Trig functions at /categories/math-trig/ for related formulas.
- SEQUENCE syntax: =SEQUENCE(rows, [columns], [start], [step])
- rows (required): Number of rows to return
- columns (optional): Number of columns (default 1)
- start (optional): Starting number (default 1)
- step (optional): Increment (default 1)
- Confirm SEQUENCE arguments match the syntax shown above before filling down.
- Lock table and range references with $ when copying formulas across rows or sheets.
Formula checklist before you copy down
- Confirm SEQUENCE arguments match the syntax shown above before filling down.
- Lock table and range references with $ when copying formulas across rows or sheets.
- If results look wrong, check for text stored as numbers and invisible spaces with TRIM.
- Spot-check three known input rows manually against expected output.
Related Excel functions
- ROW (/functions/row/): Returns the row number of a reference.
- COLUMN (/functions/column/): Returns the column number of a reference.
- RANDARRAY (/functions/randarray/): Returns an array of random numbers.
Errors to watch for
- Requires Excel 365 or Excel 2021 — review causes on linked error pages in the directory.
Copy-paste audit workflow
- Enter SEQUENCE on three test rows with known expected output documented on a QA tab.
- Fill down only after absolute references are locked on lookup tables and rate tables.
- Compare against manual calculation or a calculator for financial and statistical functions.
- Search this directory for comparison guides when choosing between similar functions in the same category.
SEQUENCE worked examples to copy
- =SEQUENCE(5) — Numbers 1-5. Expected result: 1,2,3,4,5.
- =SEQUENCE(3, 3, 0, 2) — 3x3 even numbers. Expected result: 0,2,4,6,8,10,12,14,16.
SEQUENCE reference summary for crawlers and offline review
- SEQUENCE belongs to the Math & Trig category in Excel. Generates a list of sequential numbers in an array.
- Full syntax: =SEQUENCE(rows, [columns], [start], [step]). Open /functions/sequence/ for parameters, FAQs, and related pages.
- Common mistakes: Requires Excel 365 or Excel 2021
- Pair this function with comparison guides when another Excel formula might fit the same task better.
- Review fix-excel-formula-errors when unexpected errors appear after upgrading Excel or sharing across locales.