Table of Contents
To number a list once, type 1 and 2, select both cells, then drag the fill handle down. For formula-based numbering, use =SEQUENCE(7) for seven rows or =SEQUENCE(1,7) for seven columns in a supported Excel version.
Fill an existing pattern
For labels such as M01 and M02, enter both examples, select them, and drag the lower-right corner. If the cells repeat, use Auto Fill Options > Fill Series where available.




Generate a longer series without dragging
In desktop Excel, type the starting number and use Home > Fill > Series. Choose Columns to fill down or Rows to fill across. Select Linear, enter the step and stop value, and confirm.




Older ribbon and Fill Series screenshots
Some versions show the Fill command under Editing and allow you to customize the ribbon. Use the existing command if it is already visible.








Number with a formula
To increment a previous number, put 1 in A2 and =A2+1 in A3, then fill down. If you want a number based directly on position, use =ROW()-ROW($A$2)+1 in A2 and copy it down. Keep fixed values for identifiers that must stay with a record after sorting.



Use SEQUENCE in newer Excel versions
Enter =SEQUENCE(7) in the first cell and leave the area below it clear. If Excel displays #SPILL!, check for occupied cells or place the formula outside an Excel table. See Microsoft's SEQUENCE reference for compatible versions.

Number visible rows after filtering
If column B contains a value for every record, enter =IF(B2="","",SUBTOTAL(103,$B$2:B2)) in A2 and fill down. The fixed first reference and moving last reference count visible, nonblank entries through the current row. The code 103 excludes filtered and manually hidden rows. Use a reliably populated column, as cells with formulas that return empty text can affect counts.


After filtering or sorting, check a few rows against the underlying records. The SUBTOTAL examples and the safe sorting and filtering lesson show what changes with visibility.
Use AutoFill for fixed labels, SEQUENCE for a spill range, and SUBTOTAL when the displayed order should respond to filters.
Reader Comments 0
Sign in with email or Google to join the discussion.