Note: The other languages of the website are Google-translated. Back to English
English English

How to separate serial numbers for different values in a column in Excel?

To number rows or columns in Excel can be quite quick and easy. But do you know how to automatically restart numbering when a different value is entered in a column, and continue when there are repeated values as shown below? Please follow the instructions to get the job done.

Separate serial numbers for different values in a column in Excel

Let's say you have a list of values, and there are serial numbers assigned to the values as shown below. To separate serial numbers for different values in the list, please do as follows.

1. Enter the following formula in the cell A2:


Note: In the formula, B2 is the top cell of the value list. You should leave the dollar signs ($) the way they are, since the dollar sign makes the row letter and column number right behind it absolute, so the row and column won’t adjust when you copy the formula to below cells.

2. Select the cell A2, drag the fill handle (the small square in the lower-right corner of the selected cell) down to apply the formula to the below cells.

3. If you need to make the serial number and its corresponding value in one cell, you can use the formula below in the cell C2. After entering the formula, drag the fill handle down to the cells below.


Note: In the formula, A2 is the top cell of the serial number, and B2 is the top cell of the value list. " " is a space between A2 and B2. And you will get “1 A” as a result as shown below. You can change the snippet " " to other values such as ". " to get “1. A”.

4. Before you delete the column A and B, please convert the formulas in column C to text values so that you won’t get errors: Copy the column C2:C9, and then right click on a cell (say, cell C2) and select the Values button under Paste Options on the drop-down menu as shown below.

Alternatively, you can use Kutools for Excel’s To Actual feature to convert the formulas in C2:C9 to text directly by selecting the range and then click on the To Actual button on the Kutools tab.

Note: If you find the above two steps (step 3 and 4) are a bit annoying, please use Kutools for Excel's Combine rows, columns, or cells without losing data feature: Select the range A2:B9, then on Kutools tab, select Merge & Split > Combine rows, columns, or cells without losing data. See screenshot:

Related articles

How To Assign Serial Number To Duplicate Or Unique Values In Excel?

If you have a list of values which contains some duplicates, is it possible for us to assign sequential number to the duplicate or unique values? It means giving a sequential order for the duplicate values or unique values as following screenshot shown. This article, I will talk about some simple formulas to help you solving this task in Excel.

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations