Excel How to Sequence Numbers with Formulas and Fill

Formulas & functions · Updated December 2, 2026

To sequence numbers in Excel, enter the first two numbers in adjacent cells, select both, and drag the fill handle to extend the pattern. For a formula-based sequence, enter =SEQUENCE(10) in a blank cell to generate 1 through 10; this function is available in Microsoft 365 and Excel 2021 or later.

Choose a method for your sequence

The best approach depends on whether you need a quick, fixed list, a sequence that updates when you change its starting point, or numbers that follow a particular interval. Excel offers both manual fill tools and formulas.

  • Use AutoFill for a fast sequence you can extend by dragging or copying.
  • Use Fill Series when you want to specify a step size or an ending value through a dialog.
  • Use SEQUENCE when you want a formula that spills a number series into neighboring cells and adjusts when its inputs change.
  • Use a row-based formula when you need a sequence that can be copied down in older Excel versions.

These methods produce numeric values, not necessarily permanent identifiers. If other formulas or records depend on the numbers staying fixed, consider converting the results to values after generating them.

Continue numbers with AutoFill

For a simple list such as 1, 2, 3, 4, use two starting values so Excel can recognize the increment:

  1. Type 1 in A1 and 2 in A2.
  2. Select A1:A2.
  3. Point to the small square at the lower-right corner of the selection, called the fill handle.
  4. Drag down to the last cell you want to fill, then release.

Excel continues the pattern: dragging through A10 fills the cells with 1 through 10. For a sequence in a row, enter the first two values in adjacent columns, select both, and drag the fill handle to the right. If you enter only one starting number and drag, Excel may copy that number rather than count upward. Starting with two values makes the intended step clear.

To create a pattern that skips numbers, enter two values showing the interval. For example, place 5 in A1 and 10 in A2, select both, and drag downward. Excel continues 15, 20, 25, and so on. The difference between the first two values is the step.

Specify a step with Fill Series

Fill Series is useful when you know the starting value, increment, and stopping point, especially for a long sequence. Enter the starting number in a cell and select the range you want to fill. In Excel for Microsoft 365 on Windows, choose Home > Fill > Series. In the dialog, choose whether the series runs in rows or columns, select Linear for a constant step, and enter the step value and stopping value. Select OK.

For example, to fill A1:A10 with odd numbers starting at 1, enter 1 in A1, select A1:A10, choose a series in columns with a step value of 2 and a stop value of 19, then select OK. The results are 1, 3, 5, through 19. Check that the selected range is large enough for the ending value; Excel cannot fill cells outside the selection.

For dates, Fill Series can also create regular calendar intervals. Enter a date, select the intended range, and open the Series dialog. Choose Date and select the unit—such as day, weekday, month, or year—when those options are available. This differs from simply adding a fixed number of days, which may not match a calendar-month pattern.

Generate a dynamic sequence with SEQUENCE

The SEQUENCE function returns a series that spills into adjacent cells. With an empty area available and the formula entered in A1, =SEQUENCE(10) returns the numbers 1 through 10 vertically. The optional arguments let you control the number of rows, number of columns, starting number, and increment.

With the formula entered in A1, =SEQUENCE(5,1,10,3) returns 10, 13, 16, 19, and 22 in A1:A5. The arguments mean five rows, one column, start at 10, and increase by 3. To create a horizontal sequence of six numbers beginning at 1, enter =SEQUENCE(1,6,1,1) in A1; the results spill across six columns.

Spilled formulas require the cells where results will appear to be empty. If any cell in the spill area contains data, Excel displays a #SPILL! error. Clear or move the obstructing content, and the sequence can appear. You can also refer to the whole spilled result with a spill reference such as A1# in a formula.

SEQUENCE is available in Microsoft 365 and Excel 2021 or later. In Excel for the web, dynamic arrays are supported, though the exact interface can differ. On Mac, the function works in supported Excel versions; ribbon names and placement may vary. If a workbook must work in an older Excel version, use AutoFill or a copied formula instead.

Use a formula that works in older Excel

A row-based formula can create a sequence without SEQUENCE. If the first number should appear in A2, enter =ROW()-1 in A2 and copy it down. The formula returns 1 in row 2, 2 in row 3, and continues by one for each row. If you insert or move rows, the result follows the worksheet row number, which may or may not suit your numbering needs.

To control the starting number and increment, put the start value in B1 and the step in B2. With those values in place, enter =$B$1+(ROW()-ROW($A$4))*$B$2 in A4 and copy it down. If B1 contains 10 and B2 contains 5, A4 returns 10, A5 returns 15, and A6 returns 20. The dollar signs keep the input references fixed as the formula is copied. This approach is useful in older Excel releases that do not support dynamic arrays.

Formulas recalculate, so a sequence based on row position can change when rows are inserted or deleted. If each record needs a permanent ID, generate the numbers and then copy the cells and use Home > Paste > Paste Special > Values to replace formulas with fixed values. On Mac, use the Paste Special options on the Home tab or the context menu; keyboard shortcuts can vary by version.

Common issues and number formatting

A sequence may look wrong for a few predictable reasons. If dragging repeats the first number, select two consecutive starting values or use Fill Series. If dragging does not show the fill handle, check that the fill handle feature is enabled in Excel Options under Advanced. If numbers display as 1, 2, 3 but calculations treat them as text, change the cell format to General or Number and check for a leading apostrophe or imported text values.

Formatting changes how a value looks, not its underlying number. For example, a custom format such as 000 can display the value 7 as 007 while keeping it numeric. This can be helpful for codes that need a fixed visual width. If leading zeroes are part of an identifier and should not be treated as a number, store the entries as text instead; number formats do not turn a numeric value into a text identifier.

AutoFill may also copy formatting from the starting cells. If you want the numbers but not the formatting, use the Auto Fill Options button that appears after dragging and choose Fill Without Formatting, or apply the desired formatting afterward. Be cautious with sequences used as keys: sorting or deleting rows can make formula-based row numbers change, so fixed values are safer for permanent identifiers.

Frequently Asked Questions

How do I make Excel number rows automatically?
Enter 1 and 2 in the first two cells, select them, and drag the fill handle. For a formula, enter =ROW()-1 in A2 and copy it down; this numbers row 2 as 1.

How do I sequence numbers by 5?
Enter two values five apart, such as 5 and 10, select both, and drag the fill handle. Or use =SEQUENCE(10,1,5,5) in a blank cell to return ten values starting at 5 and increasing by 5.

Can Excel create a sequence across columns?
Yes. Enter two starting values in neighboring cells and drag the fill handle to the right. With SEQUENCE, enter =SEQUENCE(1,8,1,1) to spill 1 through 8 across a row.

Why does SEQUENCE show a #SPILL! error?
One or more cells where the results need to appear are not empty, or the formula is inside an Excel table that cannot accommodate the spill. Clear the obstructing cells or place the formula in an open area outside the table.

How do I keep sequence numbers from changing?
Copy the generated cells, then use Paste Special to paste values. This removes the formulas, leaving the displayed numbers fixed even if the source cells or worksheet row positions later change.

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.