Same user ID for multiple entries

Fester675

Board Regular
Joined
Sep 16, 2016
Messages
141
Hi all

I have a column of data with Users names and a column of User IDs - the ID is to anonymise and not have the ability to trace an individual.

So for example - 3 entries for John Smith; 1 entry for Jane Doe; 5 entries for Sam Brown....

so the 3 John Smith entries will have the same user id = 001; Jane Doe = 002; Sam Brown = 003 - even though there are 9 rows of data.

Any formula that can help me do this?

TIA
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
There many ways to achieve this. To avoid complex formulas I suggest...


A
B
C
D
E
1
Name​
ID​
Unique List​
ID​
2
John Smith​
001​
John Smith​
001​
3
Jane Doe​
002​
Jane Doe​
002​
4
John Smith​
001​
Sam Brown​
003​
5
Sam Brown​
003​
6
John Smith​
001​
7
Sam Brown​
003​
8
Sam Brown​
003​
9
Sam Brown​
003​
10
Sam Brown​
003​

Create a unique list (D2:D4) - you can use Data > Remove duplicates

Formula in E2 copied down
=TEXT(COUNTA(D$2:D2),"000")

Formula in B2 copied down
=IF(A2="","",VLOOKUP(A2,D:E,2,0))

M.
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,645
Members
448,974
Latest member
DumbFinanceBro

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