Excel SEQUENCE Function Examples for Dates and Numbers

Formulas & functions · Updated November 19, 2026

Excel’s SEQUENCE function creates a spill range of consecutive numbers, dates, or other values from one formula. For example, enter =SEQUENCE(5) in a clear cell to return 1 through 5 vertically; change its arguments to set the number of rows and columns, the starting value, and the step between values.

What the SEQUENCE function does

SEQUENCE is a dynamic array function: one formula can return several results, and Excel places those results in neighboring cells automatically. The function is useful when you need a numbered list, a grid, a run of dates, or a changing series that should update when its inputs change. Instead of filling a formula down five rows, you can ask one formula to produce five results.

SEQUENCE is available in Microsoft 365 and Excel 2021 or later, including current versions of Excel for Mac and Excel for the web. It is not available as a worksheet function in Excel 2019 and earlier. If a workbook using SEQUENCE is opened in an older version, that version may show a compatibility error rather than calculate the array.

Syntax and how the arguments work

The function has four arguments: the number of rows, the optional number of columns, the optional starting value, and the optional step. Rows is required; if columns is left out, Excel returns one column. If start is omitted, the first value is 1, and if step is omitted, each value increases by 1. Rows and columns determine the shape of the result, while start and step determine its sequence.

For a vertical list of five values beginning at 1, Excel returns 1, 2, 3, 4, and 5. A horizontal sequence instead has one row and multiple columns. With a two-dimensional result, Excel fills across each row before moving to the next row. The output is a spilled array, not five separate formulas: edit the formula in its original cell to change the whole result.

Number sequence examples

With cells A1:A5 clear and the formula entered in A1, this returns the integers 1 through 5 vertically:

=SEQUENCE(5)

With cells B1:F1 clear and the formula entered in B1, this returns 10, 20, 30, 40, and 50 across one row:

=SEQUENCE(1,5,10,10)

The first argument is 1 row, the second is 5 columns, the third starts at 10, and the fourth adds 10 each time. The same approach works for a series that decreases. With A1:A5 clear and the formula entered in A1, the result is 5, 4, 3, 2, 1:

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

A step can be a fraction as well as a whole number. With A1:A5 clear and the formula entered in A1, this returns 0, 0.5, 1, 1.5, and 2:

=SEQUENCE(5,1,0,0.5)

These examples are handy for labels, sample data, and test calculations. They do not create permanent values: the results recalculate as a formula, so copy and paste values if you need a fixed snapshot.

Create a two-dimensional number grid

SEQUENCE can produce a rectangular array in one step. With A1:D3 empty and the formula entered in A1, Excel fills a three-row-by-four-column grid with 1 through 12:

=SEQUENCE(3,4)

The first row is 1, 2, 3, 4; the second is 5, 6, 7, 8; and the third is 9, 10, 11, 12. This is useful for quickly laying out test values or building a numbered matrix. To start at 101 and increase by 10 in the same shape, use the following formula with A1:D3 empty:

=SEQUENCE(3,4,101,10)

That grid contains 101 through 131 by tens, arranged across rows. The size of the intended spill area matters: if any cell in A1:D3 is occupied, Excel cannot place the complete result.

Use SEQUENCE to generate dates

Excel stores dates as serial numbers, so a sequence with a step of 1 can represent consecutive calendar days. With A2:A8 empty and the formula entered in A2, this creates seven dates beginning January 1, 2026:

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

The results are January 1 through January 7, 2026. If the cells display numbers instead of dates, select the spill range and choose a date format from Home > Number. The values are still dates; formatting changes how Excel displays them, not the underlying serial values.

For a series of month starts, add whole months to a starting date. With A2:A7 empty and the formula entered in A2, this returns the first day of each month from January through June 2026:

=EDATE(DATE(2026,1,1),SEQUENCE(6,1,0,1))

Format the output as dates to read it easily. EDATE advances by calendar months, which is different from adding a fixed number of days. For example, adding one month to January 31 can land on February 28 or 29, because February has no 31st day. With A2:A7 empty, the following formula returns six month-steps from January 31, 2026; the displayed dates are January 31, February 28, March 31, April 30, May 31, and June 30:

=EDATE(DATE(2026,1,31),SEQUENCE(6,1,0,1))

A simple sequence of dates includes weekends. It does not automatically make a weekday-only work calendar or account for holidays. Those requirements need additional logic, such as a workday function, and holiday dates should be supplied if they need to be excluded.

Generate identifiers and labels

You can combine SEQUENCE with text functions to create a series of readable IDs. With A2:A6 clear and the formula entered in A2, the result is INV-001, INV-002, INV-003, INV-004, and INV-005:

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

TEXT formats each number with three digits, including leading zeros. The ampersand joins that formatted number to the fixed prefix. Change the row count to create more IDs, or change the starting value to continue a series. Because the output is formula-driven, check that the spill area is empty before using it beside other data.

The same pattern can label rows or produce numbered steps, but the displayed label is text rather than a number. If later calculations need the numeric sequence, keep the numbers in a separate column or refer to the numeric source rather than trying to calculate with the combined ID.

SEQUENCE compared with filling or copying

For a short, fixed list that will never change, typing values or using the fill handle may be enough. SEQUENCE is more convenient when the length, starting number, or interval may change, because one formula can derive the whole list from arguments or cell references. It also avoids maintaining a separate formula in every row.

SEQUENCE differs from ROW, which returns the row number of a cell. A ROW-based formula can be useful when each record needs a number tied to its current position, but it normally needs to be copied or filled down. SEQUENCE directly returns an array with a chosen shape. Use the method that matches the job: a fixed list can be values, a position-dependent label can use a row reference, and a variable-sized generated list is a good fit for SEQUENCE.

Spill behavior and common problems

A dynamic array formula occupies one formula cell and spills into adjacent cells. The cells showing the results are not independent formula cells; select the original formula cell to edit the calculation. If the formula result changes size, Excel adjusts the spill range where it can.

  • #SPILL! usually means Excel cannot place the entire result. Clear or move anything in the intended spill area, including values or formulas, and check for merged cells that obstruct the output.
  • A blocked result inside a table: dynamic array formulas cannot spill within an Excel table. Put the formula outside the table, or use a table-compatible approach that returns one result per row.
  • Unexpected date numbers: format the result cells as dates. SEQUENCE arithmetic can return valid Excel date serials even when the cells currently use a General or Number format.
  • Unexpected orientation: the rows argument controls vertical size and columns controls horizontal size. Use one row for a horizontal list and one column for a vertical list.
  • Function name not recognized: confirm that the workbook is open in Excel 2021 or Microsoft 365. Older Excel versions do not support SEQUENCE.

In Excel for Windows, an error indicator may offer a spill-range option that helps identify the obstructing cells. On Mac or the web, the same principle applies: inspect the cells where the array is meant to appear and remove any conflict. Formula argument separators can also depend on regional settings; the examples here use commas, as requested, but an installation configured for another list separator may display or require a different separator.

Frequently Asked Questions

How do I make SEQUENCE go across columns? Set rows to 1 and set columns to the number of values you want. For example, with A1:E1 empty and the formula entered in A1, =SEQUENCE(1,5) spills 1 through 5 horizontally.

Can SEQUENCE generate dates? Yes. Add a sequence of day offsets to a starting date for consecutive days, or use EDATE with a sequence of month offsets for calendar-month intervals. Format the results as dates so they display as calendar dates instead of serial numbers.

Can I use SEQUENCE to skip weekends? Not by itself. A step of 1 produces every calendar day, including Saturdays and Sundays. To generate working days, use additional workday logic and provide a holiday range if holidays should be skipped.

Why does my SEQUENCE formula show #SPILL!? Excel cannot place one or more results in the required output range. Check for existing content or merged cells in that area, and place the formula outside a table if the array needs to spill.

Does SEQUENCE work in older versions of Excel? It is supported in Excel 2021 and Microsoft 365, including current Mac and web versions. Excel 2019 and earlier do not support the function, so a workbook relying on it needs a compatible alternative for those users.

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.