Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Sequential Numbering: Fill, SEQUENCE & Fixes

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel sequential numbering is the practice of filling a column with an unbroken series like 1, 2, 3, 4 so every row has a stable identifier. The fastest way is to type 1 in the first cell, type 2 in the cell below, select both cells, then drag the small square in the bottom-right corner of the selection (the fill handle) down as far as you need. Excel recognises the pattern and continues it. If you want the numbers to survive sorting and row deletion, use a formula instead: type =ROW()-1 in the first data row (adjust the -1 to match how many header rows sit above it) and fill it down. Either method takes under a minute; the choice depends on whether your list will be re-sorted later.

What You'll Need

  • Excel for Windows, Excel for Mac, or Excel for the web. The steps below work in all three; the fill handle exists on every version, and the SEQUENCE function requires Microsoft 365 or Excel 2021 and later.
  • A worksheet with your data already entered, ideally with a single header row at the top.
  • An empty column reserved for the numbers, usually column A or the column immediately to the left of your data.

Menu names and ribbon labels can differ slightly between versions, platforms and regions, so if a button is not exactly where described, look for the nearest equivalent on the Home tab.

Step-by-Step

  1. Pick your column and leave the header alone. Put a label such as "No." or "ID" in the header cell, then start numbering in the first data row beneath it. Mixing a number into the header row is the most common reason a later sort scrambles everything.
  2. Use the two-cell drag method for a quick static list. Type 1 in the first data cell and 2 in the cell directly below. Select both cells. Hover over the fill handle until the cursor becomes a thin black cross, then drag down to the last row. Release and Excel fills 3, 4, 5 and so on.
  3. Use the double-click trick for long lists. With the two seed cells selected, double-click the fill handle instead of dragging. Excel fills down automatically to the last row that has data in the adjacent column. This is far quicker than dragging through thousands of rows and stops exactly where your data stops.
  4. Use the Fill Series dialog for exact control. Type 1 in the first cell, select the whole range you want numbered (including that cell), then go to Home > Fill > Series. Choose Columns, Linear, set the step value to 1 and type your end value. Click OK. This is the cleanest option when you already know the exact count.
  5. Use a formula when the list will be sorted or filtered. In the first data row type =ROW()-1 if row 1 is your header. Fill it down with the fill handle. Because the formula reads the row position rather than storing a fixed value, the numbers renumber themselves correctly after a sort.
  6. Use SEQUENCE for a single dynamic spill. In the first data cell type =SEQUENCE(COUNTA(B2:B1000)), replacing B with a column that is always populated in your data. Excel spills the whole numbered list down from that one cell. If you prefer a fixed count, =SEQUENCE(50) produces 1 to 50.
  7. Convert formulas to fixed values when the list is final. Select the numbered column, copy it, then use Paste Special > Values over the same range. This removes the formulas so the numbers stop changing if rows are later inserted above them.
  8. Check the result. Scroll to the bottom of the list and confirm the last number matches the number of data rows. If it does not, you have either a blank row inside the range or a formula that started from the wrong row.

Common Mistakes

Numbering before sorting. Static numbers typed by hand do not travel with their rows. If you sort the data afterwards, the numbers stay put and now point at the wrong records. Number last, or use a ROW formula.

Forgetting the header offset. =ROW() in row 2 returns 2, not 1. Subtract the number of rows above your first data row, which is usually 1 for a single header.

Dragging with Ctrl held down. Holding Ctrl while dragging the fill handle copies the value instead of incrementing it, so every cell shows 1. Release Ctrl and drag again.

Leaving blank rows inside the range. The double-click fill stops at the first gap in the adjacent column, so a single empty cell halfway down truncates your numbering.

Numbering filtered rows. Dragging the fill handle over filtered data writes into hidden rows too. Use =SUBTOTAL(103,$B$2:B2) if you need numbers that count only visible rows.

Tips

Keep the number column immediately to the left of your data so the double-click fill has a reliable neighbour to measure against. Use a table (select your range and press Ctrl+T) and any formula column fills automatically as new rows are added, which removes the maintenance entirely. For invoice or order numbers that must never repeat, a formula based on ROW is safer than typed values because it cannot drift out of sequence after an edit. If you need leading zeros such as 001, 002, apply a custom number format of 000 rather than typing the zeros, so the cells stay numeric and still sort correctly. Finally, freeze the header row with View > Freeze Panes so you can confirm the column is behaving while scrolling a long list.

Troubleshooting

Every cell shows the same number. The fill handle copied rather than incremented. Re-enter 1 and 2 in two cells, select both, and drag again. If it still copies, check File > Options > Advanced and make sure "Enable fill handle and cell drag-and-drop" is ticked.

The numbers restart or skip. A hidden or blank row is breaking the pattern. Select the whole column, use Home > Find & Select > Go To Special > Blanks to locate gaps, then fill them or delete the empty rows.

The formula shows #NAME?. SEQUENCE is not available in your version of Excel. It exists in Microsoft 365 and Excel 2021 onward; on older versions use the ROW method or the Fill Series dialog instead.

Numbers changed after you inserted a row. That is expected with ROW-based formulas and usually desirable. If you need fixed numbers, convert the column to values with Paste Special before making structural edits.

The fill handle has disappeared. It is switched off in options, or you are working in a protected sheet. Unprotect the sheet via Review > Unprotect Sheet if you have the password, then try again.

Frequently Asked Questions

How do I number rows 1 to 100 quickly?

Type 1 in the first cell, then go to Home > Fill > Series, choose Columns and Linear, set the step to 1 and the stop value to 100, and click OK. Alternatively type =SEQUENCE(100) in a single cell if your version supports it.

Why do my numbers not stay in order after sorting?

They were typed as fixed values. Replace them with =ROW()-1 so each number is recalculated from its row position, or renumber after the sort is finished.

Can I number only the visible rows in a filtered list?

Yes. Use =SUBTOTAL(103,$B$2:B2) and fill down. The 103 argument counts visible cells only, so the sequence stays continuous when rows are hidden.

How do I add leading zeros like 001?

Select the cells and apply a custom number format of 000 via Format Cells > Number > Custom. Typing an apostrophe before the digits also works but converts the value to text, which breaks sorting and formulas.

Does sequential numbering work in Excel for the web?

Yes. The fill handle, Fill Series and SEQUENCE all work in the browser version. Some ribbon items sit in slightly different places, so look on the Home tab if a button is not where you expect.

Can I restart numbering for each group?

Yes. Use =COUNTIF($B$2:B2,B2), where column B holds the group name. Each time the group value changes, the count restarts at 1.