Auto Populate Column

Neilwvr

New Member
Joined
May 14, 2014
Messages
12
Hi,

I have searched and found code but none seem to work...
Let's assume the following from a dummy table: Sheet = 'Users'
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Name[/TD]
[TD]Empl ID[/TD]
[TD]Manager[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Mark[/TD]
[TD]00001[/TD]
[TD]Manager 1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Sue[/TD]
[TD]00002[/TD]
[TD]Manager 2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Joe[/TD]
[TD]00003[/TD]
[TD]Manager 3[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Mary[/TD]
[TD]00004[/TD]
[TD]Manager 2[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Jeffrey[/TD]
[TD]00005[/TD]
[TD]Manager 1[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Eddy[/TD]
[TD]00006[/TD]
[TD]Manager 2[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Henry[/TD]
[TD]00007[/TD]
[TD]Manager 1[/TD]
[/TR]
</tbody>[/TABLE]

Goal(s):
1) Get User/Employee details using Empl ID as the Lookup.
I have a sheet 'Manager Lookup' that get's details based on "Empl ID"(B1) below, from the above table 'Users' using various Vlookups (to get- Name, Empl ID, Manager,...etc)

Sheet = 'Manager Lookup'
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Empl#:[/TD]
[TD]00002[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Username:[/TD]
[TD]Sue[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Manager:[/TD]
[TD]Manager 2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

2) Using the data pulled via Vlookup to get the Manager in (B3) for the Username in (B2) as a New Lookup Field...
Populate a Column of ALL the Employees that fall under that Manager i.e. "Manager 2"

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD]Employees[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]Sue[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD]Mary[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD]Eddy[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I would like this without using VBA.
Thanks.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi,

I have searched and found code but none seem to work...
Let's assume the following from a dummy table: Sheet = 'Users'
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Name[/TD]
[TD]Empl ID[/TD]
[TD]Manager[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Mark[/TD]
[TD]00001[/TD]
[TD]Manager 1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Sue[/TD]
[TD]00002[/TD]
[TD]Manager 2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Joe[/TD]
[TD]00003[/TD]
[TD]Manager 3[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Mary[/TD]
[TD]00004[/TD]
[TD]Manager 2[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Jeffrey[/TD]
[TD]00005[/TD]
[TD]Manager 1[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Eddy[/TD]
[TD]00006[/TD]
[TD]Manager 2[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Henry[/TD]
[TD]00007[/TD]
[TD]Manager 1[/TD]
[/TR]
</tbody>[/TABLE]

Goal(s):
1) Get User/Employee details using Empl ID as the Lookup.
I have a sheet 'Manager Lookup' that get's details based on "Empl ID"(B1) below, from the above table 'Users' using various Vlookups (to get- Name, Empl ID, Manager,...etc)

Sheet = 'Manager Lookup'
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Empl#:[/TD]
[TD]00002[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Username:[/TD]
[TD]Sue[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Manager:[/TD]
[TD]Manager 2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

2) Using the data pulled via Vlookup to get the Manager in (B3) for the Username in (B2) as a New Lookup Field...
Populate a Column of ALL the Employees that fall under that Manager i.e. "Manager 2"

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD]Employees[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]Sue[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD]Mary[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD]Eddy[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I would like this without using VBA.
Thanks.
Hi Neilwvr,

Goal 1 can be achieved with the following 2 Index / Match formulas:

B2 formula - =INDEX(Users!$A$2:$A$8,MATCH('Manager Lookup'!B1,Users!$B$2:$B$8,0))
B3 formula - =INDEX(Users!$C$2:$C$8,MATCH('Manager Lookup'!B1,Users!$B$2:$B$8,0))

I am currently not sure about goal 2 without using VBA, but I suspect there will be a way with just formulas.
 
Upvote 0
I don't see where
for the Username in (B2) as a New Lookup Field
comes into Goal 2 as you only need the Manger name :confused:

You can also achieve it with an Index Match. Please note: input the formula without the curly brackets, then commit the formula with Ctrl-Shift + Enter not just Enter. If done correctly Excel will insert the curly brackets.
Do not put in the curly brackets manually...,it won't work.

Formula in B6 and drag down.
Excel Workbook
AB
1Empl#:2
2Username:Sue
3Manager:Manager 2
4
5Employees
6Sue
7Mary
8Eddy
9
Manager Lookup
Excel 2010
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
 
Last edited:
Upvote 0
Please explain what is wrong with the results in post #3
 
Upvote 0
"to get the Manager in (B3) that was extracted for the Username in (B2)" - This was misinterpreted... I can see how misleading this was (My Bad) ;)

This worked Perfectly! Thank you so much... I will have a proper look to see where I went wrong with mine.
Years back, it would have populated the entire column without the need to drag... I forgot that they changed that.

Thanks again.
 
Upvote 0
I did not see this till after I responded. You obviously commented while I was responding to the first response. :)
 
Upvote 0
it would have populated the entire column without the need to drag... I forgot that they changed that.

Not how I remember autofill working (copy/paste is a bit different), if you double click the bottom right corner it autofills down level with the data in the next column (if there is any) but that was always the same as far as my memory goes (probably only as far back as 2003 these days as a long long time since I used 95,97 or 2000 :)).

and being honest you seriously don't want to fill an array formula down the 1 million+ rows there are these days unless you want to take a holiday while it calculates.



I did not see this till after I responded. You obviously commented while I was responding to the first response.

No problem
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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