Auto Numbering in Excel

Header Ads Widget

Responsive Advertisement

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.
You can download this Auto Numbering excel Excel Template here – Auto Numbering excel Excel Template

Methods are as follows:

    • Fill Handle
      • Fill Series
        • CountA function
          • Row Function
            • Subtotal for filtered data
              • Creating an Excel Table
              • 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.

              Auto numbering in Excel example 1-1

              Steps to be followed:

                • Enter 1 in the A2 cell and 2 in the A3 cell to make the pattern logical.

                Auto numbering in Excel example 1-2

                  • 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.

                    Auto numbering in Excel example 1-3

                      • 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.

                      Autonumbering in Excel example 1-3

                      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.

                              Autonumbering in Excel example 1-4

                              2. Fill Series Method

                              This method is more controlled and systematic in numbering the rows.

                              Auto numbering in Excel example 2-1

                              Steps to be followed:

                                • Enter 1 in the A2 cell -> go to the ‘Home tab of the ribbon.

                                Auto numbering in Excel example 2-2

                                  • Select the “Fill” drop-down -> Series.

                                  Auto numbering in Excel example 2-3

                                    • A series of dialog boxes will appear.

                                    Auto numbering in Excel example 2-4

                                      • Click the Columns button under Series and insert number 9 in the Stop value: input box. The number series will appear. Press OK.

                                      Autonumbering in Excel example 2-5

                                      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.

                                      Autonumbering in Excel example 2-6

                                      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.

                                      Autonumbering in Excel example 3-1

                                      Autonumbering in Excel example 3-2

                                      • 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

                                       Autonumbering in Excel example 4-1

                                      If the row starts from 5th, the formula will change accordingly, i.e. =ROW() – 4

                                      Autonumbering in Excel example 4-2

                                      • 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.

                                      Autonumbering in Excel example 4-3

                                      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.

                                      Autonumbering in Excel example 5-1 

                                      Autonumbering in Excel example 5-2

                                      Autonumbering in Excel example 5-3

                                      We will copy this filtered data into another sheet and delete the “Roll no” serial values.

                                      Autonumbering in Excel example 5-4

                                      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.

                                      Autonumbering in Excel example 5-5

                                      Autonumbering in Excel example 5-6

                                      With the selected cell, drag the fill handle (+) downwards along the column. This will populate the rest of the cells serially.

                                      Autonumbering in Excel example 5-7

                                      • 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

                                      Autonumbering in Excel example 6-1

                                      Create Table dialog box will appear. Specify range or table name

                                      Autonumbering in Excel example 6-2.1

                                      or

                                      Autonumbering in Excel example 6-2.2

                                      Click OK.

                                      Tabular data is converted into Excel Table (named Table 3).

                                      Autonumbering in Excel example 6-3

                                      In the A2 cell, enter the formula.

                                      Formula:

                                      =Row()-Row(Table[#Header])

                                      This will automatically fill the formula in all the cells.

                                      Auto numbering in Excel example 6-4

                                        • 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 in cell A2 of the first row.

                                        Auto numbering in Excel example 7-1

                                          • Enter =A2+1 in cell A3

                                          Auto numbering in Excel example 7-2

                                            • Select A3 and drag the fill handle (+) to the last cell within the range. This will auto-populate the remaining cells.

                                            Autonumbering in Excel example 7-3

                                            • 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 enabled for Auto Numbering in Excel.