+ Reply to Thread
Results 1 to 8 of 8

vlookup to a specific sheet by drop down box

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

    vlookup to a specific sheet by drop down box

    I'm in need of your expert help again. I think I want a vlookup but I could be wrong. I can make 1 vlookup work but I can not get to the right sheet by selecting the sheet from the drop box.

    1 drop box linked to cell C1 (sheet names - Jan, Feb, Mar, etc.)
    1 drop box linked to cell D1 (same on each sheet - Location A, Location B, Location C, etc.)

    I tried "=VLOOKUP(D1,C1,2,0)" but that failed.

    "=VLOOKUP(D1,Jan!B:J,2,0)" - this works by telling it what sheet to look at but I need to chose what month (sheet) from the drop down box.

    Can you show me the correct formula or a better one?
    Thanks in advance for your help and knowledge.

    Michelle
    Last edited by leem; 04-29-2015 at 12:21 PM.

  2. #2
    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,929

    Re: vlookup to a specific sheet by drop down box

    When you refer to a sheet name or cell ref, you need to use INDIRECT(), so would you use something like...

    =vlookup(D1,INDIRECT(C1&D1),2,0)

    However, I have a feeling that INDEX/MATCH or using MATCH inside your vlookup may be what you need. I suggest you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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

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

    Re: vlookup to a specific sheet by drop down box

    FDibbins
    Thank you for taking a look at this. I have attached a sample.
    Thanks
    Michelle
    Attached Files Attached Files

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

    Re: vlookup to a specific sheet by drop down box

    That makes it much easier to understand, thanks

    Try this, copied down...
    =INDEX(Jan!$C$2:$K$12,MATCH(Master!$D$1,INDIRECT($C$1&"!$B$2:$B$12"),0),MATCH(Master!$B2,INDIRECT($C$1&"!$c$1:$k$1"),0))

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

    Re: vlookup to a specific sheet by drop down box

    Thank you. I put the formula in and the numbers change based on the location in Column D1 but if I select Feb it still only brings in the Jan numbers. I don't think I made that clear..sorry. I need it to look up the correct month tab and the correct location on that month tab.

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

    Re: vlookup to a specific sheet by drop down box

    No, you were very clear, I forgot to work on the very 1st reference, my apologies...
    =INDEX(INDIRECT($C$1&"!$c$2:$k$12"),MATCH(Master!$D$1,INDIRECT($C$1&"!$B$2:$B$12"),0),MATCH(Master!$B2,INDIRECT($C$1&"!$c$1:$k$1"),0))

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

    Re: vlookup to a specific sheet by drop down box

    That is perfect! Thank you so much and thank you for sharing your knowledge.

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

    Re: vlookup to a specific sheet by drop down box

    Happy to help, thanks for the feedback

+ 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. Drop down lists won't return specific data in second drop down menu, just 0.0
    By Torchdesign in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-28-2014, 11:03 AM
  2. [SOLVED] Vlookup in UserForm - Get Input from listbox, Lookup in specific table from specific sheet
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2013, 09:00 AM
  3. Update specific sheet based on drop-down list parameters
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2013, 07:42 AM
  4. Drop down to select a specific sheet
    By kdraper in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-12-2008, 01:04 PM
  5. [SOLVED] VLOOKUP specific monthly accounting data by selecting drop down li
    By Toni in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-05-2006, 04:45 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