Auto Populate Cells

shanealbrandt

New Member
Joined
Aug 12, 2008
Messages
25
Hi, I have two columns in my spreadsheet - one that lists employeeID and the other lists Employee Name. I am creating a drop down lists so employees can select their manager. I would like for Excel to auto populate the manager's employeeID when someone selects their name.

Can someone assist?

The columns look like this:
ColumnA (Name)
Smith, Jane
Smith, John
Smith, Michael

ColumnB (EmplID)
123456
123457
123458

I would like that if someone selects Jane Smith, the next cell is auto populated with 123456 - Jane's employee ID.
 
You need to make those ranges Absolute.

Code:
=INDEX($E$2:$E$4276,MATCH(L2,$F$2:$F$4276,0),0)

A quick way to do this is place your cursor in the formular bar on say E2, and hit your F4 key. Do this for all you E's and F's.

Then you can copy down.

Harry

EDIT: for got the L2. I htink you can figure that out.
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Wow guys, thanks so much for all your help! I've learned a lot. I still have the problem of the "#NA" showing before a name is selected. That is the only thing I have left to fix. So if I have this formula:

"=INDEX($E$2:$E$4276,MATCH($L2,$F$2:$F$4276,0),0)"

already in a cell, how would I change that formula to show blank unless a name is selected?

Then I am done! :)
 
Upvote 0
Perfect!! That is exactly what I was looking for. Thank you everyone very, very much for your help!!

-S
(Denver, CO-USA)
 
Upvote 0
I just read through this thread and there is a lot of great information here. Thanks!

My question is, how would i take it to the next step, which is populating multiple cells... To continue the example being used, if there was another column of data next to the employee numbers (lets say tenure), how could you get that to populate in the cell next to the employee number that is populated with VLOOKUP?

I hope this makes sense...
 
Upvote 0
Welcome to the Board!

If you're using VLOOKUP, you can move to the right, but adjusting the column argument. =VLOOKUP(Lookup Item,Look in Range,Column Reference,True/False).

Here's a good VLOOKUP tutorial.

Hope that helps,
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,269
Members
449,219
Latest member
daynle

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