SEQUENCE in Excel: Build Number Series Automatically

Formulas & functions · Updated November 20, 2026

In Excel for Microsoft 365, use the SEQUENCE function to create a series of numbers that spills into neighboring cells automatically. For example, with an empty worksheet and A1 as the starting cell, enter =SEQUENCE(5) to return the numbers 1 through 5 in a vertical column.

What SEQUENCE does

SEQUENCE generates an array of consecutive numbers. You choose how many rows and columns it should return, the first value, and the amount to add between values. That makes it useful for numbering records, building test data, producing a list of dates, or creating a horizontal series for a chart.

Unlike typing a value and dragging Excel’s fill handle, a SEQUENCE formula creates the whole requested list from one cell. In current Excel, the result is a dynamic array: the formula stays in its original cell, while the other results appear in adjacent cells. Those returned cells are called the spill range. If the formula’s settings change, Excel updates the spilled results automatically.

SEQUENCE is available in Microsoft 365 and Excel 2021 or later. It is also available in Excel for the web and current Excel for Mac. Older Excel versions that do not support dynamic arrays may show the function as unavailable or return a compatibility error.

How the arguments work

SEQUENCE accepts four arguments in this order: rows, columns, start, and step. Rows is required and sets the number of rows in the result. Columns sets the number of columns; if you omit it, Excel returns one column. Start sets the first number, and step sets the difference between each number. If you omit start or step, each defaults to 1.

Rows and columns describe the shape of the result, not the number of values to add. For example, 3 rows and 4 columns produce 12 values arranged in a rectangle. Excel fills that array from left to right across each row, then continues on the next row. Both dimensions should be positive whole numbers.

For instance, with a blank worksheet and A1 selected, =SEQUENCE(3,4) returns 1, 2, 3, and 4 across the first row; 5 through 8 across the second; and 9 through 12 across the third. If you need a single row, set rows to 1. If you need one column, set columns to 1 or leave that argument out.

Create a basic number series

To make a vertical list from 1 to 10, select an empty cell and enter this formula. With A1 as the starting cell and the cells below it empty, the result occupies A1:A10 and contains 1 through 10:

=SEQUENCE(10)

To make the same values across a row instead, ask for one row and ten columns. With A1 as the starting cell and B1:J1 empty, this formula spills across A1:J1:

=SEQUENCE(1,10)

You can specify both dimensions when you want a grid. With A1 as the starting cell and an empty area at least three rows high and four columns wide, this formula returns a 3-by-4 array containing 1 through 12:

=SEQUENCE(3,4)

This is handy for generating sample values or laying out numbered positions. Keep in mind that a rectangular result will occupy every cell in its chosen spill area, so the cells cannot already contain unrelated data.

Set a starting value and step

The start and step arguments let you generate a series other than 1, 2, 3. With A1 as the starting cell and A2:A5 empty, the following formula returns 10, 12, 14, 16, and 18. The sequence begins at 10 and adds 2 each time:

=SEQUENCE(5,1,10,2)

A negative step counts down. With A1 as the starting cell and the four cells below it empty, this example returns 20, 15, 10, and 5:

=SEQUENCE(4,1,20,-5)

The step can also be a fraction. With A1 as the starting cell and A2:A5 empty, this formula returns 0, 0.25, 0.5, 0.75, and 1:

=SEQUENCE(5,1,0,0.25)

Excel stores those results as numbers, so the displayed precision depends on the cell’s number format. If a value looks rounded, select the result cells and use Home > Increase Decimal to show more places; the underlying values are not changed by that display setting.

Use SEQUENCE for dates and labeled IDs

Excel dates are stored as serial numbers, so SEQUENCE can generate a run of consecutive dates. With A1 as the starting cell and A1:A7 available, this formula starts at January 1, 2026, and returns seven dates through January 7, 2026:

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

Excel may initially display the results as serial numbers. Select the spilled cells and choose a date format from Home > Number Format. Formatting changes how the values look, not the dates themselves. You can also use the date serial in another calculation, such as adding a number of days.

For a list of consecutive days that skips weekends or holidays, a simple SEQUENCE is not enough: it increments by calendar days. A workday calendar needs additional logic, such as the WORKDAY function, and a holiday list if applicable. Confirm the calendar requirements before using a generated date list for schedules or deadlines.

SEQUENCE can generate numeric suffixes for labels too. With A1 as the starting cell and the next four cells below it empty, this formula returns INV-001 through INV-005:

="INV-"&TEXT(SEQUENCE(5),"000")

Here, TEXT formats each number with three digits, and the ampersand joins that formatted value to the prefix. The result is text, not a number. That distinction matters if you later need to sort or calculate with the values; keep the numeric sequence separately when arithmetic is required.

Dynamic arrays and spill behavior

In a dynamic-array version of Excel, enter the formula only in the top-left cell of the intended output. Do not copy it down to fill the rest of the range: Excel populates the spill cells itself. When you select a cell in the spill range, the formula bar shows the formula from the anchor cell, and Excel may outline the full output range.

To change the result, edit the formula in its anchor cell. For example, changing the row count changes the spill range’s height. You can refer to the entire spill range in another formula by adding the spill operator to the anchor reference, such as A1#, when A1 contains a dynamic-array formula. This is useful when a second calculation needs to follow the list as its size changes.

Dynamic arrays cannot spill into occupied cells, merged cells, or beyond the edge of the worksheet. A spill range also cannot expand inside an Excel Table in the same way it does in ordinary cells. Put the SEQUENCE formula outside the table if it needs to return multiple cells, or use a table’s calculated-column behavior for a formula intended to repeat down table rows.

Excel for Windows, Mac, and the web supports the same basic SEQUENCE behavior in supported versions, though ribbon layout and update timing can differ. In Excel for the web, formulas recalculate in the browser; in desktop Excel, they recalculate in the workbook. The key practical requirement is the same in each: leave room for the output array.

Common errors and fixes

The most common problem is #SPILL!. This means Excel cannot place all the results in the required cells. Click the warning icon beside the formula, if shown, to identify the obstruction, then clear or move the blocking content. Also check for merged cells and make sure the output does not extend past the worksheet’s final row or column.

If you see #NAME? or Excel does not recognize SEQUENCE, check the Excel version. The function is supported in Microsoft 365 and Excel 2021 or later, but not in many older perpetual versions. Opening a workbook that contains it in an unsupported version can prevent the formula from calculating correctly.

If the result appears as a single value rather than a list, check whether the formula was entered in a version without dynamic arrays, or whether the formula was entered in a context that does not allow spilling. Also inspect the formula arguments: SEQUENCE(5) intentionally returns five rows, while SEQUENCE(1,5) intentionally returns five columns.

When a date list appears as large integers, it is usually a number-format issue rather than a faulty formula. Apply a date format to the spill range. If numbers have unexpected decimal places, change the display format instead of rounding the formula unless you specifically need rounded values for later calculations.

When to use another method

SEQUENCE is a good choice when you want a predictable, formula-driven list and have a supported Excel version. It is especially convenient when the requested number of items may change, because one formula can resize its spill range without manually filling cells.

For a short, fixed list, typing the values directly may be clearer. For a series that should follow neighboring values or a recognized pattern, enter the first few values and use the fill handle or Home > Fill > Series. Those approaches work in older Excel versions as well, though the resulting cells may contain individual values rather than one controlling formula.

For numbering records that already exist, consider whether a fixed sequence is really the right rule. A generated 1-to-N list can shift when rows are inserted, filtered, or sorted. If the number must be a permanent identifier, store it as a value or create an ID under a process that prevents duplicates. A dynamic list is useful for display and calculations, but it is not automatically a durable record key.

Frequently Asked Questions

How do I use SEQUENCE in Excel?

Enter =SEQUENCE(rows) in an empty cell, replacing rows with the number of values you need. For example, with A1 as the starting cell and room below it, =SEQUENCE(5) spills the numbers 1 through 5 down a column. Add columns, start, or step when you need a different shape or pattern.

Can SEQUENCE create numbers across columns?

Yes. Set rows to 1 and columns to the number of values you want. For example, with A1 as the starting cell and four empty cells across the row, =SEQUENCE(1,4) returns 1, 2, 3, and 4 horizontally.

How do I make SEQUENCE start at zero or another number?

Use the third argument for the starting value. With A1 as the starting cell and five available rows, =SEQUENCE(5,1,0,1) returns 0 through 4. The fourth argument controls the increment between results.

Why does SEQUENCE show #SPILL?

Excel cannot place one or more results in the cells the formula needs. Clear the blocked cells, unmerge any cells in the output area, and check that the complete array fits on the worksheet. A formula inside a table may also need to be moved outside it to spill.

Does SEQUENCE work in older Excel versions?

SEQUENCE is available in Microsoft 365 and Excel 2021 or later, including supported Mac and web editions. It is not available in many older Excel versions. For those versions, use Fill Series or enter a formula that increments from the preceding cell.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.