Populating Manager IDs? Vlookup?

psimpsonuml

New Member
Joined
Oct 26, 2019
Messages
6
Hey all,

I've got this list of Employee ID - Employee Name - MGR ID - Manager Name. 1400 employees, ~400 managers.

I'm looking for a formula or function or feature - SOMETHING that will allow me to populate the Manager ID. I know VLOOKUP would work if it was a 1:1 relationship but as the dummy example I made below shows - There are 6 employees who share the same manager so I'm looking for a formula that takes "124" and populates it in C4-C9

[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]ID[/TD]
[TD="width: 64"]Name[/TD]
[TD="width: 64"]MGR ID[/TD]
[TD="width: 64"]Manager Name[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]Bubba[/TD]
[TD][/TD]
[TD]None[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[TD]Dooody[/TD]
[TD][/TD]
[TD]Bubba[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]Ho tep[/TD]
[TD][/TD]
[TD]Dooody[/TD]
[/TR]
[TR]
[TD="align: right"]126[/TD]
[TD]Elvis[/TD]
[TD][/TD]
[TD]Dooody[/TD]
[/TR]
[TR]
[TD="align: right"]127[/TD]
[TD]Alpha[/TD]
[TD][/TD]
[TD]Dooody[/TD]
[/TR]
[TR]
[TD="align: right"]128[/TD]
[TD]Alfa[/TD]
[TD][/TD]
[TD]Dooody[/TD]
[/TR]
[TR]
[TD="align: right"]129[/TD]
[TD]Gamma[/TD]
[TD][/TD]
[TD]Dooody[/TD]
[/TR]
[TR]
[TD="align: right"]130[/TD]
[TD]Boring[/TD]
[TD][/TD]
[TD]Dooody[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi,

In cell C4 ... you could test following formula

Code:
=INDEX($A$1:$A$9,MATCH(D4,$B$1:$B$9,0))

Hope this will help
 
Upvote 0
Hi,

In cell C4 ... you could test following formula

Code:
=INDEX($A$1:$A$9,MATCH(D4,$B$1:$B$9,0))

Hope this will help

So - this will populate D4 for everything in Column C, but I've got 400 rows to go through. Some people manage ~30 people, some manage 1.
 
Upvote 0
[TABLE="width: 244"]
<colgroup><col span="2"><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Sorry
I want C2 to Identify the two matching names in B and D column, and pull in the ID matching the name. See below

[TABLE="width: 208"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]MGR ID[/TD]
[TD]Manager Name[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]James006[/TD]
[TD="align: right"]128[/TD]
[TD]Alpha[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[TD]PSIMPSONUML[/TD]
[TD="align: right"]129[/TD]
[TD]Gamma[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]Ho tep[/TD]
[TD="align: right"]124[/TD]
[TD]PSIMPSONUML[/TD]
[/TR]
[TR]
[TD="align: right"]126[/TD]
[TD]Elvis[/TD]
[TD="align: right"]124[/TD]
[TD]PSIMPSONUML[/TD]
[/TR]
[TR]
[TD="align: right"]127[/TD]
[TD]Alpha[/TD]
[TD="align: right"]124[/TD]
[TD]PSIMPSONUML[/TD]
[/TR]
[TR]
[TD="align: right"]128[/TD]
[TD]Alfa[/TD]
[TD="align: right"]123[/TD]
[TD]James006[/TD]
[/TR]
[TR]
[TD="align: right"]129[/TD]
[TD]Gamma[/TD]
[TD="align: right"]123[/TD]
[TD]James006[/TD]
[/TR]
[TR]
[TD="align: right"]130[/TD]
[TD]Boring[/TD]
[TD="align: right"]123[/TD]
[TD]James006[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
[TABLE="class: cms_table, width: 208"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]MGR ID[/TD]
[TD]Manager Name[/TD]
[/TR]
[TR]
[TD="align: right"]123[/TD]
[TD]James006[/TD]
[TD="align: right"]128or127?[/TD]
[TD]Alpha[/TD]
[/TR]
[TR]
[TD="align: right"]124[/TD]
[TD]PSIMPSONUML[/TD]
[TD="align: right"]129[/TD]
[TD]Gamma[/TD]
[/TR]
[TR]
[TD="align: right"]125[/TD]
[TD]Ho tep[/TD]
[TD="align: right"]124[/TD]
[TD]PSIMPSONUML[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
So
the formula provided should work Ok
Code:
C2=IFERROR(INDEX($A$2:$A$9;MATCH(D2;$B$2:$B$9;0));"")
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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