+ Reply to Thread
Results 1 to 8 of 8

fill list based on 2 selections

  1. #1
    Forum Contributor
    Join Date
    11-03-2004
    Posts
    139

    fill list based on 2 selections

    I could use your expert knowledge in figuring out how to populate a column of information.

    Basic idea: I have 6 tabs of different information - same set up on each tab. On the data tab I would like column b2 to populate depending on the selection from the drop down boxes. In my example I selected AUG for 1 drop down and CL FT for the other drop down. I would like the numbers from the CL FT tab - AUG column to populate to the data tab b2 and down. I have attached an example for a much better explanation.

    Thanks in advance for your help.
    Michelle
    Attached Files Attached Files
    Last edited by leem; 09-18-2012 at 03:34 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: fill list based on 2 selections

    Michelle,

    Attached is a modified version of your posted workbook.
    In cell A2 and copied down to A50 is this formula:
    Please Login or Register  to view this content.

    Then in cell B2 and copied down to B50 is this formula:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: fill list based on 2 selections

    two list fill down.xls

    Hi Michelle,

    How about this?
    Regards,

    jeversf

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: fill list based on 2 selections

    @jeversf, You have hardcoded into the formula to always use the 'CL FT' sheet regardless of what is selected in the second listbox. You can use the Indirect() function to get around that limitation.

  5. #5
    Forum Contributor
    Join Date
    01-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 365
    Posts
    221

    Re: fill list based on 2 selections

    thanks for that, i haven't used the indirect much before but i can definitely see the benefit to it.
    good job on the solution!

  6. #6
    Forum Contributor
    Join Date
    11-03-2004
    Posts
    139

    Re: fill list based on 2 selections

    This is perfect! Thank you so much for your brilliance. And thanks for your quick response.
    Michelle

  7. #7
    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,946

    Re: fill list based on 2 selections

    in B2, copied down, try this....

    =VLOOKUP(A2,INDIRECT("'"&$C$1&"'!A2:CN50"),MATCH(B1,'DR PT'!$A$1:$CN$1,0),FALSE)
    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

  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,946

    Re: fill list based on 2 selections

    i just noticed an error in that formula, it should have been....

    =VLOOKUP(A2,INDIRECT("'"&$C$1&"'!A2:CN50"),MATCH(B1,INDIRECT("'"&$C$1&"'!$A$1:$CN$1"),0),FALSE)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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