SpreadsheetFormulas
beginnerSEQUENCEDATE

Generate Number Sequences with One Formula

You need numbered rows — invoice lines, order IDs, a 12-week date column for a project plan — and typing 1, 2, 3 then dragging the fill handle breaks the moment rows are added or removed.

Quick formula
=SEQUENCE(10)
Result
1=SEQUENCE(5)=SEQUENCE(5,1,1001,1)
211001
321002
431003
541004
651005

Excel & Google Sheets

=SEQUENCE(10)

This formula works in both Excel and Google Sheets.

How it works

=SEQUENCE(10) spills the numbers 1 through 10 into the cells below — one formula owns the whole list, so there's nothing to re-drag when the list changes; edit the formula and it rebuilds. The full form is =SEQUENCE(rows,columns,start,step): =SEQUENCE(10,1,1001,1) numbers invoices from 1001, and =SEQUENCE(12,1,DATE(2026,7,6),7) makes twelve weekly dates starting 6 July — format those cells as dates. Dates work because spreadsheets store them as numbers, so a step of 7 is exactly one week. SEQUENCE needs Excel 365 or 2021; Google Sheets has it with the same arguments.

10
How many rows to generate. =SEQUENCE(10) gives 1 through 10, one per row.
columns (optional)
=SEQUENCE(2,5) fills 2 rows by 5 columns, counting across each row then down.
start, step (optional)
Where to begin and how much to add each time: =SEQUENCE(10,1,1001,1) gives 1001 to 1010.

When to use it

Use it to number invoice lines and order rows, build a weekly date column for a project schedule, generate month numbers for a forecast, or feed a series into another formula without helper columns.

Common mistakes

  • #SPILL! because the landing zone isn't empty.

    SEQUENCE needs blank cells below (and to the right, for multiple columns). Clear everything in the range it's trying to fill.

  • A date series shows numbers like 46199.

    Those are date serial numbers without formatting. Select the spilled cells and apply a date format — the math is already right.

  • #NAME? in Excel 2019 or earlier.

    SEQUENCE needs Excel 365 or 2021. The old-Excel fallback is =ROW()-1 copied down, which renumbers itself when rows move.

Did this formula help?

Engine-verified against the sample data aboveLast reviewed 2026-07-08