Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Number Rows or Columns Automatically in Excel

Use Excel’s fill handle, Fill Series, SEQUENCE, or SUBTOTAL to number a list, create headings, or renumber filtered rows.

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.

How to automatically number columns in Excel quickly and simply Picture 1

How to automatically number columns in Excel quickly and simply Picture 2

How to automatically number columns in Excel quickly and simply Picture 3

How to automatically number columns in Excel quickly and simply Picture 4

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.

How to automatically number columns in Excel quickly and simply Picture 5

How to automatically number columns in Excel quickly and simply Picture 6

How to automatically number columns in Excel quickly and simply Picture 7

How to automatically number columns in Excel quickly and simply Picture 8

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.

How to automatically number columns in Excel quickly and simply Picture 13

How to automatically number columns in Excel quickly and simply Picture 14

How to automatically number columns in Excel quickly and simply Picture 15

How to automatically number columns in Excel quickly and simply Picture 16

How to automatically number columns in Excel quickly and simply Picture 17

How to automatically number columns in Excel quickly and simply Picture 18

How to automatically number columns in Excel quickly and simply Picture 19

How to automatically number columns in Excel quickly and simply Picture 20

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.

How to automatically number columns in Excel quickly and simply Picture 9

How to automatically number columns in Excel quickly and simply Picture 10

How to automatically number columns in Excel quickly and simply Picture 11

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.

How to automatically number columns in Excel quickly and simply Picture 12

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.

How to automatically number columns in Excel quickly and simply Picture 21

How to automatically number columns in Excel quickly and simply Picture 22

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.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.