+ Reply to Thread
Results 1 to 22 of 22

One LookUp to Populate Multiple Columns

  1. #1
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    One LookUp to Populate Multiple Columns

    I want to be able to use one Vlookup to populate multiple columns. I think I can use an array formula, but I haven't found good explanation with a good breakdown. Any help would great!

    I have attached a sample spreadsheet.

    the look up is in cell A7 and I want to populate C7:H7 with employee ID's. In A7 would be the Vlookup for the manager's name and C7:H7 would be his employees.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: One LookUp to Populate Multiple Columns

    A7 already has a drop down in it, so there won't be a VLOOKUP in that cell, too, it would just get erased the moment someone used the drop down to select a name.

    So, a full example, please. If JEFF is selected in A7, what are the values that should appear in C7:H7?
    If JASON is selected, what would the values be?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    Currently, when I use the dropdown list, I have multiple variables that populate using the vlookup for that name. What I would like to do is select a managerL Jeff, John, or whom ever and those cells c7:H7 populate with their employee's id.

    For example,

    I select Jeff (manager) in A7, then In C7 I have employee 1 (dan), D7 employee 2 (Ray), etc. Does that make better sense? Then when I select John (manager) in A7 the same cells c7:h7 populate with John's employee's ids. I am not sure if I am explaining it properly.
    Last edited by reynolds8481; 06-08-2015 at 10:59 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    Welcome to the forum

    If you make the headings on each sheet the same (sheet1 has Employee: sheet2 just has employee pick 1), then you can use this...
    =INDEX(Sheet2!$A$2:$D$7,MATCH(Sheet1!$A$7,Sheet2!$B$2:$B$7,0),MATCH(Sheet1!C$7,Sheet2!$A$1:$D$1,0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    Thank you for the help. My problem is that I have a 150 employees that continuously change due to turnover, new hires, or promotion and 10 managers. It sounds like that I may not be able to use the dropdown to select the manager and have a lookup to pul the current employee names for that manager. Could there be an alternate method to perform these actions? I don't know much about macros, but I am willing to learn!

    Thanks again for the help!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    It sounds like that I may not be able to use the dropdown to select the manager and have a lookup to pul the current employee names for that manager.
    Apart from the qty of names - why not?

  7. #7
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    lol, thats what I am trying to find out. Can I use the dropdown that I have, that will pull the names I need into a horizontal format from a master list of names like I would w/ an hlookup for a single entry?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    Sounds like you only have 10 manager names? Thats a small enough list for a DD, and once you have that name, you can do all sorts of extraction stuff. vlookup and index/match will pull out 1 matching name (only) from a list, but something like index/small/if array can pull out multiple entries that match a specific criteria.

    Show me what you want the answer to look like?

  9. #9
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    Where I have Jeff, would be the drop down with the multiple manager names. where the "emp id" would be where I would want the employee names to populate. Then based on those names I can pull the data needed for the metric fields.



    jeff employee: "emp id" "emp id" "emp id" "emp id" "emp id"

    metric 1 0 0 0 0 0
    metric 2 0 0 0 0 0
    metric 3 0 0 0 0 0
    metric 4 0 0 0 0 0
    metric 5 0 0 0 0 0

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    Did you try my formula from post #4?

  11. #11
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    sample.xlsxsample.xlsxWhere I have Jeff, would be the drop down with the multiple manager names. where the "emp id" would be where I would want the employee names to populate. Then based on those names I can pull the data needed for the metric fields. I have attached a sample xls also.



    jeff employee: "emp id" "emp id" "emp id" "emp id" "emp id"

    metric 1 0 0 0 0 0
    metric 2 0 0 0 0 0
    metric 3 0 0 0 0 0
    metric 4 0 0 0 0 0
    metric 5 0 0 0 0 0

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    Where I have Jeff, would be the drop down with the multiple manager names. where the "emp id" would be where I would want the employee names to populate. Then based on those names I can pull the data needed for the metric fields.
    Yes, I get that. Your sample only has one name per manager, so thats why I gave you that formula (did you try it...you didnt say?)

    If you have more than 1 name per manager, then upload a sample showing that, and also show what you want

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    Where I have Jeff, would be the drop down with the multiple manager names. where the "emp id" would be where I would want the employee names to populate. Then based on those names I can pull the data needed for the metric fields.
    Yes, I get that. Your sample only has one name per manager, so thats why I gave you that formula (did you try it...you didnt say?)

    If you have more than 1 name per manager, then upload a sample showing that, and also show what you want

  14. #14
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    The dropdown has more than one manager. There are 6, each of those managers will have 15 employees, I just have the 5 on the sheet for ease. I am trying that formula now, but I am not sure about naming a 150 sheets, finding, changing, removing, weekly. If I can use a lookup table or something that I can paste the updated roster, that would be best. That is what I currently do at an individual level for performance discussions. Now, I am trying to bring it to a manger level and review progress made on certain metrics.

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    The dropdown has more than one manager.
    Yes we have covered that part, not a prolem there.

    but I am not sure about naming a 150 sheets,
    Wait, where did the 150 sheets suddenly come from?

    I will ask again, please upload a small, representative sample workbook of what you have, and what you want

  16. #16
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    Maybe I am confused...

    If you make the headings on each sheet the same (sheet1 has Employee: sheet2 just has employee pick 1), then you can use this...
    =INDEX(Sheet2!$A$2:$D$7,MATCH(Sheet1!$A$7,Sheet2!$B$2:$B$7,0),MATCH(Sheet1!C$7,Sheet2!$A$1:$D$1,0))

    I was thinking I would need a new sheet for each employee. The sample I uploaded is what I want it to look like. I want to select the manager from the dropdown and the employees name and/or id populates in the "emp id" cells. If you want to see the actually sheet I am working form I will have to scrub the info as the data is sensitive. Sorry if I am being a pain...Excel is obviously not my strong suit.

  17. #17
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    Thats ok, put a more realistic dummy filer together and send that. I will wait for that, so that we can give you what you need

  18. #18
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    Sorry it took so long. I have uploaded my book w/ dummy data in it. From A2, the managers name, pulls the id into e2 where I have a v or h lookup for multiple different uses. I want the E2 id to populate the e10:t10 with the values from e2:e31 based on the values from sheet 2 g2:31. I hope that makes better sense than I did last night. Thanks again for all the help!
    Attached Files Attached Files

  19. #19
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,969

    Re: One LookUp to Populate Multiple Columns

    OK thats better

    Put this ARRAY formula in E10 and copy across...
    =IFERROR(INDEX(Sheet2!$F$2:$F$31,SMALL(IF(Sheet2!$G$2:$G$31=$E$2,ROW(Sheet2!$G$2:$G$31)-1),COLUMNS(Sheet2!$A$1:A1))),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  20. #20
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    That's freaking awesome! Thank you so much! Really, bad apples man, thank you.

    Is is possible to break it down a bit so I understand how to edit it to fit the real data?

    Thanks again!!!

  21. #21
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: One LookUp to Populate Multiple Columns

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  22. #22
    Registered User
    Join Date
    06-08-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    11

    Re: One LookUp to Populate Multiple Columns

    Book6.xlsx

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 04-08-2014, 03:11 AM
  2. [SOLVED] Multiple lookup adding columns, then multiplying, then lookup, add, and subtract
    By mamig in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-08-2013, 12:55 AM
  3. [SOLVED] Populate multiple columns
    By jrg123 in forum Excel General
    Replies: 3
    Last Post: 06-19-2012, 01:09 PM
  4. [SOLVED] populate columns A & B based on lookup in column C
    By linksavage in forum Excel General
    Replies: 3
    Last Post: 12-22-2010, 02:35 PM
  5. Populate multiple columns
    By nick in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-10-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1