Change multiple names to numbers

Farro

New Member
Joined
Jan 14, 2016
Messages
13
I am attempting to change names in multiple cells to their employee numbers.

I need to have a macro or function that can read from a list of names, compare to the list that I have created and attribute the new number in that cell (or a selected cell).

I have provided an example below.

A
1 Ryan Frank
2 Tim Jones
3 Shelly Show
4 Bill Ballroom
5 Diana Happen
6 Todd Torpo

The above would be the standard cell and then I would want to have a list such as

Ryan Frank 123456
Tim Jones 123232
Shelly Show 164675
Bill Ballroom 123489
Diana Happen 246557
Todd Torpo 756865


Then a way to have my report change to

A
1 123456
2 123232
3 164675
4 123489
5 246557
6 756865

Any help would be appreciated and if further clarification is needed please let me know
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
INDEX/MATCH is your friend:


Excel 2016 (Windows) 32 bit
AB
11Ryan Frank
22Tim Jones
33Shelly Show
44Bill Ballroom
55Diana Happen
66Todd Torpo
7
8
91123456
102123232
113164675
124123489
135246557
146756865
15
16
17Diana Happen246557
18Tim Jones123232
19Todd Torpo756865
20Ryan Frank123456
21Bill Ballroom123489
22Shelly Show164675
Sheet1
Cell Formulas
RangeFormula
B17=INDEX($B$9:$B$14,MATCH(INDEX($A$1:$A$6,MATCH($A17,$B$1:$B$6,0)),$A$9:$A$14))


WBD
 
Upvote 0
What if it is not as clean as that and the spreadsheet looks similar to what I have attached below. This is an actual example of my spreadsheet i just changed the information around. Essentially, I am trying to substitute the names with a numbered code so I can post their results anonymously for them.



User Full NameCoursesCreditsTotal Current Credits
Ryan FrankFake Course Name 166
Bill BallroomFake Course Name 112
Fake Course Name 22
Fake Course Name 36
Fake Course Name 46
Fake Course Name 56
Fake Course Name 62.5
Course: Version 4236.5
Shelly ShowFake Course Name 16
Fake Course Name 26
Fake Course Name 36
Fake Course Name 46
Fake Course Name 56
Fake Course Name 66
Course: Version 46
Course: Version 56
Course: Version 456
Course: Version 426
Test Course6
Course 672.5
Understanding test course 31684.5
Tim JonesFake Course Name 56
Fake Course Name 66
Course: Version 46
Course: Version 5624

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Then just insert a column to the right of the "User Full Name" column and use VLOOKUP to retrieve the employee number from wherever you're storing that. It's hard to help if you don't post proper data tables - see my signature for a solution to that.

WBD
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

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