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.
Assign serial number to duplicate values with Formula
To order the duplicate values, please apply the following formula:
Enter this formula: =COUNTIF($A$2:A2,A2) into a blank cell beside your data, and then drag the fill handle down to the cells which you want to apply this formula, and the cell values have been assigned based on the duplicate values, see screenshot:
Assign serial number to unique value with Formula
To assign serial number to unique value, the below formula may do you a favor:
Enter this formula: =IF(COUNTIF(A$2:A2,A2)=1,MAX(B$1:B1)+1,VLOOKUP(A2,A$1:B1,2,0)) into a blank cell beside your data, and then drag the fill handle down to the cells that you want to apply this formula, and the unique values have been ordered as following screenshot shown:
1. In the above formula, A2is the cell contain the value you want to assign, B1 is the above cell where your formula located.
2. These formulas also can applied to the values in sorted list, and you will get the following result as you want:
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...
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.
Is it possible to assign such serial numbers within the same cell? I have a sheet that does this using a macro, but I cannot access the macro (password protected) to see how they did it.
Disclaimer: I have permission to access the macros, but it is an old sheet and the passwords are lost.
i have this data in sheet1, i work in this sheet on daily basis.
after that i make New Sheet on State Wise Name Like DL, UK, JK, MH etc.
is there any formula who automatic record State entry in State sheet, Like All DL related entry automatic record in DL Sheet.
ID I2 I3 I4 STATE
101 a j 99 DL
102 b k 55 UK
103 c l 44 JK
104 d m 22 MH
105 e n 33 DL
106 f o 77 WB
107 g p 25 DL
As your problem, may be the Kutools for Excel's Split Data feature can help you. With the Split Data utility , you can quickly split the data from one sheet to others based on column or row.
Take your data for example, after applying the Split Data feature, you will get the following result:
Please let me know if this can help you! Thank you!
If you have multiple columns need to use, first, you can combine the columns into a new helper column by using this formula:=A2&" "&B2,and then apply above
formula based on the helper column. you will get the result as you need.
Here is an image example, hope it can help you, thank you!
I have a series of different products sold in different districts. My dataset has duplicate products in all districts and I don't want to remove those duplicate. I want to count unique product in different district in different years. I added one column in EXCEL and I want to put a formula that will rename the product sold in new district for first time to be "NEW" and the continuation of sales of the same product to be renamed "CONTINUING". Which formula I ma supposed to apply in Excel? This is a sample dataset I have; I want the syntax formula in Column "Sales Status"
District: Product Concat (District+Product Sale Status