Unique Code for Same Names Appearing in a Column

manoj18071965

Board Regular
Joined
Sep 16, 2011
Messages
65
I have an excel where in D column Same name are appearing multiple times. They are already grouped I just need to provide unique_id code (1, 2, 3...) for each group as shown in below example in column E:

Col A Col B Col C Col D Col E
Sr noyearnameclean_nameunique_id
12002YOON, ALBERT,YOON, ALBERT1
22003YOON, ALBERT,YOON, ALBERT1
32004YOON, ALBERT,YOON, ALBERT1
42005YOON, ALBERT,*YOON, ALBERT1
52006YOON, ALBERT H.,YOON, ALBERT1
62007YOON, ALBERT H.,YOON, ALBERT1
72008YOON, ALBERT H.,YOON, ALBERT1
81980WARREN, ELIZABETH,WARREN, ELIZABETH2
91981WARREN, ELIZABETH,WARREN, ELIZABETH2
101983WARREN, ELIZABETH,WARREN, ELIZABETH2
111984WARREN, ELIZABETH,WARREN, ELIZABETH2
121985WARREN, ELIZABETH,WARREN, ELIZABETH2
131987WARREN, ELIZABETH, FWARREN, ELIZABETH2

<colgroup><col span="2"><col span="2"><col></colgroup><tbody>
</tbody>
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Assuming that this is going in column D, and the first line of data is row 2 (header in row 1), place a 1 in cell E2, and then place the following formula in cell E3 and copy down for all rows:
Code:
=IF(D3=D2,E2,E2+1)
 
Upvote 0
In provided example i inserted 1 & 2 values in column E manually. I want this value to be populated with formula
Did not see the formula I provided above?
If you do not like having to place a 1 in the first cell only (E2), you could use this formula in all cells instead:
Code:
=IF(ROW()=2,1,IF(D2=D1,E1,E1+1))
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,749
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top