Updated June 3, 2023
Auto Numbering in Excel
Auto Numbering in Excel generates the number automatically in a sequence or some pattern. We can enable the option of Auto numbering available in the Excel Options’ Advanced tab. We can fill and drag the numbers down to the limit we want. In another way, we can use the ROW function. This function starts counting the row by returning its number per the number mentioned in Row numbers. We can also generate auto numbers by adding +1 to the number located above.
Methods to number rows in Excel
The auto-numbering of rows in Excel would depend on the kind of data used in Excel. For Example –
-
- A continuous dataset that starts from a different row.
- A dataset that has a few blank rows and only filled rows to be numbered.
Methods are as follows:
-
-
- By Using the Fill Handle
- By Using Fill Series
- By using the CountA function
- By Using Row Function
- By Using Subtotal for filtered data
- By Creating an Excel Table
- By adding one to the previous row number
-
1. Fill handle Method
It helps in auto-populating a range of cells in a column in a sequential pattern, thus making the task easy.
Steps to be followed:
-
-
- Enter 1 in the A2 cell and 2 in the A3 cell to make the pattern logical.
-
-
-
- A small black box is on the bottom right of the selected cell.
- When the cursor is kept on the cell, it changes to a plus icon.
-
-
-
- Drag the + symbol manually till the last cell of the range or double click on the plus icon, i.e., fill handle; a number will appear automatically in serial order.
-
Note:
-
-
- The row number will get updated in case of addition/deletion of row(s)
- It identifies the series pattern from the two filled cells and fills the rest.
- This method does not work on an empty row.
- Numbers are listed serially; however, the Roman number format and alphabet listing are not considered.
- The serial number inserted is a static value.
-
2. Fill Series Method
This method is more controlled and systematic in numbering the rows.
Steps to be followed:
-
-
- Enter 1 in the A2 cell -> go to the ‘Home tab of the ribbon.
-
-
-
- Select the “Fill” drop-down -> Series
-
-
-
- A series of dialog boxes will appear.
-
-
-
- Click the Columns button under Series and insert number 9 in the Stop value: input box. The number series will appear. Press OK.
-
Fill in the first cell and apply the below steps.
-
-
- This method works on an empty row, also.
- Numbers are listed serially, but the Roman number and alphabets listing are not considered.
- The serial number inserted is a static value. A serial number does not change automatically.
-
3. COUNTA Function Method
The COUNTA function is used in numbering only those rows that are not empty within a range.
Steps to be followed:
Select the cell A5, corresponding to the first non-empty row in the range, and paste the following formula –
=IF(ISBLANK(B5),” “,COUNTA($B$5:B5))
Then, the cell gets populated with the number 1. Then drag the fill handle (+) to the last cell within the column range.
-
-
- The number in a cell is dynamic in nature. When you delete a row, the system automatically updates the serial numbers sequentially.
- We don’t consider blank rows.
-
4. Row function method
The Row function can be used to get the row numbering.
Follow the below process.
Enter the ROW() function and subtract 1 to assign the correct row number. ROW() calculates to 2; however, we want to set the cell value to 1, which is the range’s first row; hence, 1 is subtracted. Hence formula will be,
=ROW()-1
If the row starts from 5th, the formula will change accordingly, i.e. =ROW() – 4
-
-
- The row number will get updated in case of the addition/deletion of row(s).
- It is not referencing any cell in the formula and will automatically adjust the row number.
- It will display the row number even if the row is blank.
-
5. SUBTOTAL For Filtered Data
The SUBTOTAL function in Excel helps serial number a filtered dataset copied into another datasheet.
Steps to be followed:
Here is a dataset we intend to filter for marks in Maths greater than or equal to 20.
We will copy this filtered data into another sheet and delete the “Roll no” serial values.
Then, select the first cell of the column range and use the ‘SUBTOTAL‘ function wherein the first argument is 3, denoting ‘COUNT A‘.
=SUBTOTAL(3,$B$2:B2)
This will populate the cell with a value of 1.
With the selected cell, drag the fill handle (+) downwards along the column. This will populate the rest of the cells serially.
-
-
- The SUBTOTAL function is useful in rearranging the row count serially of a copied filtered dataset in another sheet.
- The serial numbers are automatically adjusted on the addition/deletion of rows.
-
6. By creating an Excel Table
Here, tabular data is converted into an Excel table.
Steps to be followed:
Firstly, select the whole dataset ->go to Insert Tab->Click on Table icon(CTRL+T) under Table Group
Create Table dialog box will appear. Specify range or table name
or
Click OK.
Tabular data is converted into Excel Table (named Table 3).
In the A2 cell, enter the formula.
Formula:
=Row()-Row(Table[#Header])
This will automatically fill the formula in all the cells.
-
-
- Row numbering will automatically adjust and update on the addition/deletion of rows.
-
7. By adding one to the previous row number
Subsequent rows get increment by 1.
Steps to be followed:
As seen in the attached screenshot, enter 1 in cell A2 of the first row.
-
-
- Enter =A2+1 in cell A3
-
-
-
- Select A3 and drag the fill handle (+) to the last cell within the range. This will auto-populate the remaining cells.
-
-
-
- The cell value is relative to the previous cell value.
- Does not update the serial numbers automatically on the addition/deletion of rows.
-
Things to Remember about Auto Numbering in Excel
-
-
- The best way for auto numbering in Excel depends on the type of data set you have to enable.
- Auto Numbering in Excel is not an inbuilt function.
- Check if the Fill option is enable for Auto Numbering in Excel.
-
Conclusion
There are different ways for Auto Numbering in Excel and number rows in serial order in Excel. Some methods will do static numbering, whereas others will do dynamic updates on the addition/deletion of rows.
You can download this Auto Numbering Excel Excel Template here – Auto Numbering Excel Template.
Recommended Articles
This has been a guide to Auto Numbering in Excel. Here we discuss how to use Auto Numbering in Excel and Methods to number rows in Excel, along with practical examples and a downloadable Excel template. You can also go through our other suggested articles –