+ Reply to Thread
Results 1 to 4 of 4

Vlookup Different workbook Cell refers to sheet

  1. #1
    Registered User
    Join Date
    05-14-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    50

    Vlookup Different workbook Cell refers to sheet

    HI Guys,

    I'm using vlookup to reference information from another workbook, but is it possible to adjust this code so the sheet is selected by Cell Reference.

    Current Code

    =VLOOKUP($B$5,'C:\Users\Admin\Documents\Work Docs\Reports\[Stats.xlsx]MTD'!$A$10:$AB$500,20,FALSE)

    but would like the MTD to be changeable by cell value. for example:

    C3 value could be one of - MTD, 0106, 0206, 0306

    =VLOOKUP($B$5,'C:\Users\Admin\Documents\Work Docs\Reports\[Stats.xlsx]C3'!$A$10:$AB$500,20,FALSE)

    Cheers for your help.

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

    Re: Vlookup Different workbook Cell refers to sheet

    You would normally do this using INDIRECT(), but that does not work on closed workbooks
    Try the Morefunc add-in, to see if that will help you
    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 Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Vlookup Different workbook Cell refers to sheet

    You can find the Morefunc add-in here:

    http://www.ashishmathur.com/tag/morefunc/
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: Vlookup Different workbook Cell refers to sheet

    Thanks Tony, I just google it, but have copied that link for next time

+ 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-19-2013, 03:38 PM
  2. Button refers to macro in the wrong workbook
    By Varia in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-24-2013, 06:14 AM
  3. Forumla which refers to a cell which refers to a sheet name
    By awiller2 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-03-2012, 09:57 PM
  4. Name assigned in workbook refers to range problem!!!
    By brucemc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-25-2006, 05:12 PM
  5. [SOLVED] vlookup- refers to the range within the external file
    By Mike McLellan in forum Excel General
    Replies: 6
    Last Post: 04-28-2006, 04:35 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