SEQUENCE returns a list of numbers arranged in rows and columns, starting from a value you choose and increasing by a step you set. It replaces dragging fill handles and manual numbering with one formula that spills results automatically.
=SEQUENCE(rows, [columns], [start], [step])What does SEQUENCE do?
SEQUENCE is a dynamic array function in Excel's Math & trigonometry category. You tell it how many rows and columns you want, where to start, and how much to add each time, and it spills a grid of numbers onto the sheet. For example, =SEQUENCE(5) returns 1, 2, 3, 4, 5 down five rows.
Before SEQUENCE, creating a numbered list meant typing the first values and dragging the fill handle, or using ROW() tricks. Both break when rows are inserted or deleted. SEQUENCE is a single formula that updates itself, so numbering stays correct and you spend less time on repetitive setup.
A common situation: you need invoice numbers from 1001 to 1100, or a column of month-start dates for a report. Instead of typing or dragging, you write one SEQUENCE formula and the whole list appears. It also pairs well with functions like DATE, TEXT, and INDEX to build calendars, schedules, and test data.
When to use SEQUENCE
- Numbering rows in a table without dragging the fill handle
- Creating a list of invoice or order IDs with a fixed start and step
- Generating a series of dates, such as every Monday for a quarter
- Building a numbered checklist or seating plan
- Producing sample data for testing a spreadsheet model
- Creating row or column indexes to feed INDEX or CHOOSE
SEQUENCE syntax
=SEQUENCE(rows, [columns], [start], [step])| Argument | Required? | What to enter |
|---|---|---|
rows | Required | How many rows of numbers you want. Must be a positive number. Example: =SEQUENCE(4) returns 1, 2, 3, 4 down four rows. |
columns | Optional | How many columns to fill. Defaults to 1. Example: =SEQUENCE(2,3) returns a 2-row by 3-column grid: 1, 2, 3 on the first row and 4, 5, 6 on the second. |
start | Optional | The first number in the list. Defaults to 1. Example: =SEQUENCE(3,1,10) returns 10, 11, 12. |
step | Optional | The amount added between numbers. Defaults to 1. Example: =SEQUENCE(3,1,5,5) returns 5, 10, 15. |
What it returns: A spilled array of numbers with the requested number of rows and columns, starting at the start value and increasing by the step value. The result occupies one cell per number and overflows into neighbouring cells automatically.
SEQUENCE examples
1 Example 1: A simple numbered list
The goal is to number five rows from 1 to 5 without typing or dragging. The formula =SEQUENCE(5) asks for five rows, and because columns, start, and step are omitted they default to 1, 1, and 1. SEQUENCE returns 1, 2, 3, 4, 5 down five cells. This is the fastest way to add row numbers to a small list.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Task | |||
| 2 | Open mail | 1 | ||
| 3 | Check invoices | |||
| 4 | Update ledger | |||
| 5 | File receipts | |||
| 6 | Send report | |||
| 7 |
2 Example 2: Invoice numbers with a custom start
You need invoice numbers starting at 1001 for four new invoices. The formula =SEQUENCE(4,1,1001) requests four rows, one column, starting at 1001. The step defaults to 1, so the result is 1001, 1002, 1003, 1004. This avoids manual typing and keeps the sequence consistent if you later change the count.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Customer | Amount | |||
| 2 | Acme Ltd | 450 | 1001 | ||
| 3 | Bright Co | 1200 | |||
| 4 | Cedar Inc | 780 | |||
| 5 | Delta LLC | 300 | |||
| 6 |
3 Example 3: A grid of seat numbers
A small room has 3 rows of 4 seats, and you want seat numbers 1 to 12 laid out as a grid. The formula =SEQUENCE(3,4) asks for three rows and four columns, with start and step defaulting to 1. SEQUENCE fills across each row first: 1, 2, 3, 4 on row one, then 5, 6, 7, 8, and finally 9, 10, 11, 12. The result is a 3-by-4 block of numbers.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Room | Rows | Seats per row | |||
| 2 | Room A | 3 | 4 | 1 | ||
| 3 | Room B | 2 | 5 | |||
| 4 | Room C | 4 | 3 | |||
| 5 |
4 Example 4: Weekly dates for a schedule
You are planning four weekly team meetings starting on 2024-01-01. The formula =SEQUENCE(4,1,DATE(2024,1,1),7) asks for four rows, one column, starting at the date 2024-01-01, with a step of 7 days. SEQUENCE adds 7 to the start each time, returning 2024-01-01, 2024-01-08, 2024-01-15, and 2024-01-22. Format the result as dates to display them clearly.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Meeting | Owner | |||
| 2 | Kickoff | Ana | 45292 | ||
| 3 | Review | Ben | |||
| 4 | Planning | Cara | |||
| 5 | Retro | Dan | |||
| 6 |
5 Example 5: Order IDs with a step of 10
Your order system issues IDs in blocks of 10, starting at 5000. You need five IDs for a batch. The formula =SEQUENCE(5,1,5000,10) requests five rows, one column, starting at 5000, adding 10 each time. SEQUENCE returns 5000, 5010, 5020, 5030, 5040. This pattern is useful whenever IDs or codes follow a fixed interval rather than 1.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Product | Qty | |||
| 2 | Widget | 12 | 5000 | ||
| 3 | Gadget | 8 | |||
| 4 | Sprocket | 25 | |||
| 5 | Bolt | 40 | |||
| 6 | Nut | 60 | |||
| 7 |
Common SEQUENCE errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | One of the arguments is not a number, for example text or an empty cell reference where a count is expected. | Check that rows, columns, start, and step are numeric. Remove quotation marks around numbers and point to cells that contain numbers. |
| #NUM! | rows or columns is zero or negative, or the result would be too large for the sheet. | Use a positive whole number for rows and columns. Reduce the size if the grid exceeds the worksheet limits. |
| #SPILL! | There is not enough empty space for the spilled array because neighbouring cells contain data. | Clear the cells below and to the right of the formula, or move the formula to an area with enough free space. |
| #NAME? | The function name is misspelled or the Excel version does not support SEQUENCE. | Type =SEQUENCE( and let Excel suggest the name. SEQUENCE requires Excel 365, Excel 2021, or Excel for the web. |
Tips for using SEQUENCE
- Use
=SEQUENCE(COUNTA(A2:A100))to number only the rows that contain data. - Combine SEQUENCE with DATE to build date series, for example
=SEQUENCE(12,1,DATE(2024,1,1),1)for daily dates. - Wrap SEQUENCE in TEXT to format IDs, such as
=TEXT(SEQUENCE(5),"0000")for 0001 to 0005. - Remember that SEQUENCE spills: leave the cells below and to the right empty.
- Use the step argument with a negative number to count down, for example
=SEQUENCE(5,1,10,-1).
Frequently asked questions
What does the SEQUENCE function do in Excel?
SEQUENCE creates a list or grid of numbers. You specify how many rows and columns you want, the starting number, and the step between numbers, and Excel fills the cells automatically.
Why do I get a #SPILL! error with SEQUENCE?
A #SPILL! error means the formula's result needs more empty cells than are available. Clear the cells below and to the right of the formula, or move it to an empty area.
Can SEQUENCE create dates instead of numbers?
Yes. Use a date as the start value and a number of days as the step. For example, =SEQUENCE(4,1,DATE(2024,1,1),7) returns four weekly dates starting 1 January 2024.
Is SEQUENCE available in older versions of Excel?
SEQUENCE is available in Excel 365, Excel 2021, and Excel for the web. Older versions such as Excel 2016 do not support it and will return #NAME?.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. SEQUENCE reference