A1 = Apple, Orange, Banana, Grapes
A1 = 1. Apple, 2. Orange, 3. Banana, 4. Grapes
Kutools for Excel is a powerful add-in that frees you from performing time-consuming operations in Excel, such as combine sheets quickly, merge cells without losing data, paste to only visible cells, count cells by color and so on. 300+ powerful features / functions for Excel 2019, 2016, 2013, 2010, 2007 or Office 365!
It enables tabbed browsing, editing, and managing of Microsoft Office applications. You can open multiple documents / files in a single tabbed window, such as using the browser IE 8/9/10, Firefox, and Google Chrome. It's compatible with Office 2019, 2016, 2013, 2010, 2007, 2003 or Office 365. Demo
Kutools for Outlook is a powerful add-in that frees you from time-consuming operations which majority of Outlook users has to perform daily! It can save your time from using Microsoft Outlook 2019, 2016, 2013, 2010 or Office 365!
Kutools for Word is a powerful add-in that frees you from time-consuming operations which majority of Word users have to perform daily! It can save your time from using Microsoft Word / Office 2019, 2016, 2013, 2010, 2007, 2003 or Office 365!
Restores the old look and menus of Office 2003 to Microsoft Office 2019, 2016, 2013, 2010, 2007 or Office 365. Don’t lose time in finding commands on the new Ribbon. Easy to deploy to all computers in enterprises and organizations.
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.
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:
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, A2 is 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: