Excel Auto Numbering (Table of Contents)
Auto Numbering in Excel
Auto Numbering in Excel is used to generate the number automatically in a sequence or in some pattern. We can fill and drag the numbers down the limit we want. We can enable the option of Auto numbering available in the Excel Options’ Advanced tab. In another way, we can use the ROW function. This function starts counting the row by returning its number as 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.
-
-
-
- There is a small black box on the bottom right of the selected cell.
- The moment 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 pattern of the series from the two filled cells and fills the rest of the cells.
- 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 ‘Home tab of the ribbon.
-
-
-
- Select “Fill”drop-down -> Series
-
-
-
- Series dialog box will appear.
-
-
-
- Click the Columns button under Series and insert number 9 in the Stop value: input box. Press OK. The number series will appear.
-
Fill 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 a row is deleted, existing serial numbers are automatically updated, serially.
- Blank rows are not considered.
-
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 from it to assign the correct row number. ROW() calculates to 2; however, we want to set the cell value to 1, being the first row of the range; 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 in the serial numbering of a filtered dataset copied into another datasheet.
Steps to be followed:
Here is a dataset which we intend to filter for marks in Maths greater than or equal to 20.
Now 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.
Now, 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 the 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 as 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 incremented 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 serial number automatically on 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 to have to enable.
- Auto Numbering in Excel is not an inbuilt function.
- Ensure to check if the Fill option is enabled for Auto Numbering in Excel.
-
Conclusion
There are different ways for Auto Numbering in Excel and number rows in serial order in excel. Some of the methods will do static numbering, whereas others would 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 downloadable excel template. You can also go through our other suggested articles –
23 Online Courses | 9 Hands-on Projects | 110+ Hours | Verifiable Certificate of Completion
4.9
View Course
Related Courses