+ Reply to Thread
Results 1 to 8 of 8

Populate Required Fields with data from various worksheets based on drop down list

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    5

    Populate Required Fields with data from various worksheets based on drop down list

    I hope I am doing this correctly, this is my first forum help request.

    I am creating an Excel Spreadsheet that will be used analyze the performance of employees on a monthly basis.

    I have 14 Worksheets. 1 Which we are calling the report card, 12 others for each month of the year and 1 for reference tables.

    On the Report card sheet I have a drop down list that pulls data from a Lookup Table based on the name of the employee. Works like a champ. Is there any way to have excel pull data from a different worksheet based on a selection from another drop down list.

    I.e. I want to be able to select employee JOE BLACK from drop down menu 1 and select the desired month of review (Different Worksheet for each month) from drop down menu 2. I then I want to auto populate my required fields on the report card from the worksheet specified in drop down menu 2 with data relative to the employee in drop down menu 1.

    I hope this makes sense.

    T

  2. #2
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: Populate Required Fields with data from various worksheets based on drop down list

    If you can post some sample data I may be able to come up with something but if you can build something like this (see attached) into your formula it can work for you

    mainecoastiev1.xlsx
    Excel Guru in the making

    <----------If the question has been answered to your satisfication please click the Add Repuation star to the left

  3. #3
    Registered User
    Join Date
    04-02-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Populate Required Fields with data from various worksheets based on drop down list

    Attached is a representation of the file I am trying to develop.

    The Employee is selected in C1. I then select the month in C3.

    I want C1 to determine the employee, which it does. I want C3 to determine which sheet data gets pulled from.

    If I select Mr. Black in C1 and June in C3, my data should be 1, 2, 3, 4 in fields C5, C6, C7, C8 respectively.

    If I select Mr. Black in C1 and July in C3, my data should be 17, 18, 19, 20 in fields C5, C6, C7, C8 respectively.

    I was thinking that it would be a indirect function, but cannot seem to figure out how to make that function work using two variables.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-02-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Populate Required Fields with data from various worksheets based on drop down list

    Okay. I did some more digging on figured it out.

    Thank you to everyone who read this post. I appreciate it.

    Here is the result for future reference.

    I named each table on the various table according to the month the data was derived. I used the VLOOKUP function based on the Employee name with a nested Indirect that referenced the table equal to the month chosen in the month list.

    The formula looked like this: =VLOOKUP(C1,INDIRECT(C3),2,FALSE)

    Looking back, this is such an easy solution.

    Have a good day.

    T

  5. #5
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: Populate Required Fields with data from various worksheets based on drop down list

    This should do the trick, you'll obv need to change the range to suit your actual data

    Also I noticed that on your Ref Table tab, your dates had a space at the end, so make sure the months are exact.

    VLOOKUP with INDIRECT.xlsx

  6. #6
    Registered User
    Join Date
    04-02-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Populate Required Fields with data from various worksheets based on drop down list

    CMAN, Thanks for the input.

    I understand this entire formula =VLOOKUP($C$1,INDIRECT($C$3&"!A2:F5"),ROWS($A$1:A1)+1,0) with the exception of ROWS($A$1:A1)+1 what does this do for me. Obviously it works, I just do not know why. That range is not a ref for anything so why is it there?

    Thanks for the help.

  7. #7
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: Populate Required Fields with data from various worksheets based on drop down list

    ROWS($A$1:A1)+1 is a number incrementer, everytime you copy this down your rows, the value increases by 1

    ROWS($A$1:A1)+1 = the vaule 2 because row A1:A1 is 1 row +1
    ROWS($A$1:A2)+1 = the value 3 because row A1:A2 is 2 rows + 1

    What it does in your VLOOKUP, it replaces your column index number, so the first cell the formula is in, it will return the value from column 2. When you copy it to the next cell down it will return the value from column 3

    If you where doing this manually you would have input the column index number like so:

    =VLOOKUP($C$1,INDIRECT($C$3&"!A2:F5"),1,0)
    =VLOOKUP($C$1,INDIRECT($C$3&"!A2:F5"),2,0)
    =VLOOKUP($C$1,INDIRECT($C$3&"!A2:F5"),3,0)
    =VLOOKUP($C$1,INDIRECT($C$3&"!A2:F5"),4,0)

    Do you understand that?
    Last edited by TheCman81; 09-11-2013 at 05:55 PM.

  8. #8
    Registered User
    Join Date
    04-02-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Populate Required Fields with data from various worksheets based on drop down list

    Got it. Makes perfect sense. I appreciate it.

+ 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: 14
    Last Post: 08-10-2013, 04:07 PM
  2. Replies: 2
    Last Post: 05-06-2013, 08:53 AM
  3. Populate data in cell based on drop down list selection
    By dwoodson297 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-14-2013, 02:07 PM
  4. [SOLVED] Auto populate fields based on data in a drop down box from a second sheet
    By Grazzio in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2012, 10:34 AM
  5. Populate fields based on value in a drop-down list
    By sengelbrecht in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-10-2007, 09:29 AM

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