Yes. In Microsoft Excel for Microsoft 365, enter a SEQUENCE formula to generate a series automatically: with an empty worksheet and the formula entered in A1, =SEQUENCE(10) spills the numbers 1 through 10 into A1:A10. The results update when you change the formula’s inputs, but Excel does not automatically add a new number whenever you type in the next row; that requires a different setup.
What Excel SEQUENCE Does
SEQUENCE creates an array of sequential numbers from a single formula. Instead of typing each number or dragging a fill handle, you tell Excel how many rows and columns to return, where the sequence should start, and how much it should increase by. Excel places the results in neighboring cells using its dynamic-array spill behavior.
The function is available in Microsoft 365 and Excel 2021 or later, including Excel 2024. It is also supported in current Excel for the web. The basic formula works in Excel for Mac as well as Excel for Windows; the main differences are in some interface details, not in the function’s arguments.
This is useful for numbering records, creating test data, building calendars, generating evenly spaced values, and supplying a changing list of numbers to another formula. It is not the same as a permanent numbering feature: the sequence is calculated from the formula, so its values can change when the formula or its inputs change.
How the Formula Spills Into Cells
A dynamic-array formula is entered once, in the upper-left cell where you want the results to begin. Excel calls that cell the anchor cell. The other results appear in the cells below it, beside it, or both, according to the dimensions specified in the formula. Those output cells are the spill range, and they are not separate formulas to edit one by one.
For example, with an empty worksheet and the formula entered in A1, =SEQUENCE(4,3) returns a four-row, three-column array: 1, 2, and 3 in the first row; 4, 5, and 6 in the second; then 7, 8, and 9; and finally 10, 11, and 12. The sequence fills across each row before moving to the next row.
If you edit the formula to request more rows, Excel expands the spill range if the surrounding cells are clear. If you request fewer rows, the previous spill area shrinks. You only edit the formula in its anchor cell. Selecting an individual cell inside the spill range and trying to change its value will not replace that one result.
SEQUENCE Arguments and Numbering Examples
The function’s arguments, in order, specify the number of rows, the number of columns, the starting value, and the step between values. The row count is required. If you leave out the column count, start, or step, Excel uses 1 for each omitted argument. The row and column counts need to be positive integers; the start and step can be other numeric values.
For a basic list, with an empty worksheet and the formula entered in B2, =SEQUENCE(8) returns 1 through 8 down B2:B9. To start at a different number, with the same empty-cell condition and the formula entered in B2, =SEQUENCE(5,1,100) returns 100, 101, 102, 103, and 104 vertically. The 1 specifies one column.
You can make a sequence that counts by a chosen increment. With an empty worksheet and the formula entered in A1, =SEQUENCE(6,1,10,5) returns 10, 15, 20, 25, 30, and 35. The final argument is the step, so a negative step can count downward. With an empty worksheet and the formula in A1, =SEQUENCE(5,1,20,-2) returns 20, 18, 16, 14, and 12.
Rows and columns can also be combined to make a rectangular array. With an empty worksheet and the formula entered in A1, =SEQUENCE(3,4,2,2) returns three rows and four columns, containing 2, 4, 6, and 8 in the first row, followed by 10 through 16 in increments of 2. This is handy for mock data or a grid of values, but remember that the array occupies every cell in its full rectangle.
Numbering a List That May Change Size
To make a sequence respond to the number of entries in a list, use a count of the populated cells as the row argument. Suppose names are in A2:A6, with all five cells filled, and you want numbering to begin in B2. Enter =SEQUENCE(COUNTA(A2:A6)) in B2, with B2:B6 empty. It spills 1 through 5 alongside the names. If a sixth name is added within the counted range, the result can expand, provided the spill area is clear.
This approach has a practical limitation: COUNTA counts all nonempty cells in its range, while the sequence spills as one uninterrupted list. If the source list contains a blank between names, the generated numbers will not automatically preserve that blank row. Also, the formula only counts the range you specify. A range ending at A6 will not include a new entry typed in A7.
For a list expected to grow, use a larger planned range or a formatted Excel Table for the source data, then choose an approach suited to how the output should behave. A formula that spills cannot spill inside an Excel Table itself. You can put a dynamic-array formula outside the table and have it refer to table data, or use a table’s calculated-column behavior for row-by-row numbering.
If the desired result is a continuous number beside each nonblank source row, including gaps in the source, the formula needs to return blanks at those positions rather than simply count the entries. With source values in A2:A10 and B2:B10 clear, enter this in B2: =IF(A2:A10<>"",SEQUENCE(ROWS(A2:A10)),""). It returns a number for each nonblank row and a blank for each blank source cell; for instance, a name in A2 and A4 produces 1 in B2, blank in B3, and 3 in B4. The numbering represents row positions, not a compact count of names.
Creating Dates and Other Sequences
Excel stores dates as serial numbers, so SEQUENCE can generate consecutive dates when its starting value is a date and its step is 1. With an empty worksheet and the formula entered in A1, =SEQUENCE(7,1,DATE(2026,1,1),1) returns seven consecutive date values beginning January 1, 2026. Format A1:A7 as dates if Excel initially displays serial numbers. The formula counts calendar days, including weekends; it does not generate business days only.
For a sequence of monthly dates, simply adding 30 or 31 is not reliable because months have different lengths. One option is to generate month offsets and use date functions to construct each month; another is to use fill-series tools with a date unit. Do not interpret a step of 30 in a date sequence as “one month.” Similarly, a sequence of hourly or decimal values is just arithmetic: Excel adds the chosen step and does not apply special calendar rules.
SEQUENCE can also generate values for another formula to use. For example, if you need positions 1 through 12 for a calculation or chart axis, a sequence can provide those numbers without storing twelve separately typed entries. As with any spilled array, formulas that consume it should be designed around the actual number of results and the possibility that the size may change.
Common Problems and Fixes
- #SPILL! usually means Excel cannot place all the results. Clear the occupied cells in the intended spill range, unmerge cells there, or move the formula. A spill formula cannot overwrite existing content.
- The result does not grow. Check the formula’s row count or the range used to calculate it. A sequence based on a fixed range will not include entries typed beyond that range.
- Only one result appears. Confirm the formula is in a version that supports dynamic arrays, and check whether the formula is inside an Excel Table. Also verify that the requested row count is greater than one.
- Dates appear as large numbers. The values may be valid Excel dates displayed with a General number format. Apply a date format using Home > Number Format.
- A formula returns an error for a zero-length list. A row count of zero is not a useful SEQUENCE size and can lead to a calculation error. If the source range may have no entries, handle the empty case in a surrounding formula rather than assuming the sequence will simply return nothing.
When diagnosing a problem, select the anchor cell and inspect the formula bar first. If the formula is valid but its spill area is obstructed, Excel commonly marks the issue and can identify the blocking cell. Removing content from the spill range is preferable to copying the formula into each output cell, which defeats the dynamic-array behavior.
SEQUENCE Versus Fill Handle and ROW
SEQUENCE is best when you want one formula to produce an array whose size or values can be controlled by arguments. It is especially useful when the result should resize or when you need several rows and columns at once. The formula is transparent: the start, step, and dimensions are visible in one place.
The fill handle is often simpler for a short, fixed series. Type the first values or a pattern, select them, and drag the fill handle to extend the series. Excel’s fill tools can also create a series through the ribbon. This creates entries in individual cells rather than one spill formula, which can be useful when you need to edit or replace individual numbers independently.
A ROW-based formula is another option for numbering copied-down rows. With the first number intended in B2, enter =ROW()-ROW($B$1) in B2 and copy it down; B2 returns 1, B3 returns 2, and so on. Unlike a single SEQUENCE spill, each copied formula belongs to its own row. That can suit a table column, although it requires filling the formula down and maintaining it as the table changes.
In short, use SEQUENCE for an automatically calculated spill range, the fill handle for a quick fixed series, and a row-by-row formula or table column when each record should carry its own numbering formula. None of these methods makes a number permanently attached to a record if sorting or inserting rows changes the logic; decide whether numbering should reflect current row order or serve as a stable ID.
Frequently Asked Questions
Does Excel automatically create a sequence when I type 1 and 2?
Not in the same way as a SEQUENCE formula. Excel may extend a pattern when you drag the fill handle, but typing a number in one cell does not by itself create a dynamic sequence. Use SEQUENCE for a formula-driven spill or use the fill handle for a manually extended series.
Can SEQUENCE number rows automatically as I add them?
It can generate a changing number of results when its row argument is based on a count that includes new records. The counted range must cover those records, and the spill range must remain unobstructed. For a growing table, place a suitable spill formula outside the table or use a calculated column inside it.
Why can’t I edit one number in a SEQUENCE result?
All the displayed values belong to one formula in the anchor cell. Edit that formula to change the sequence, or replace the spill results with fixed values if individual editing is required. Replacing them removes the dynamic link.
Does SEQUENCE work in older Excel versions?
SEQUENCE is available in Microsoft 365 and Excel 2021 or later. In an older edition without the function, use the fill handle, the Fill Series command, or a copied-down formula such as ROW-based numbering instead.
Can Excel SEQUENCE create weekdays only?
Not by itself. A step of 1 creates consecutive calendar days, including Saturdays and Sundays. To produce workdays, use a workday-oriented function or a formula designed to skip weekends, and account for holidays if they matter.
Related
- Excel Day Care in Clementi: Location and Enrolment Guide
- Excel Day Care in Jurong East: Location, Fees and Checks
- Excel Day and Date Formats: Codes, Examples, and Fixes
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Sort Excel and Keep Rows Together Without Data Mix-UpsTo sort Excel data and keep each record together, select the entire data range or click inside an…
- Excel Formula for Calculating Days Between DatesTo calculate the number of elapsed days between two dates in Excel, subtract the earlier date from the…
- How to Copy a Formula in Excel All the Way Down a ColumnTo copy a formula all the way down in Excel, select the cell with the formula and double-click…
- Excel Timesheet Formula: Total Hours, Breaks, and ShiftsFor a timesheet with a start time in B2, an end time in C2, and an unpaid break…
- Excel AVERAGEIF Formula Examples: Criteria, Ranges, FixesUse Excel’s AVERAGEIF function to average values that meet one condition: =AVERAGEIF(A2:A6,"North",B2:B6). If A2:A6 contains regions and B2:B6…
- How to Hide Filter Arrows in Excel and Keep Table FiltersTo hide filter arrows in Excel without removing a table’s AutoFilter setup, click inside the table, open Table…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.