+ Reply to Thread
Results 1 to 6 of 6

Dynamic sheet reference based on adjacent cell values

  1. #1
    Registered User
    Join Date
    06-06-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    13

    Dynamic sheet reference based on adjacent cell values

    Referencing sheets based on cell value

    To anyone who can assist,

    I am having some difficulty creating a formula that references a different sheet dynamically based on the results of a different cell.

    For example, I want the results in cell D4 to pull from the sheet name mentioned in cell D2.

    My formula is designed to first check if the cell I need to start with is blank (so I don’t get a ton of excess information I used a probably not eloquent if function to return blanks if my starting point is blank)

    After that, I am using a vlookup to return a value in a chart on the sheet mentioned in cell D2

    So my formula in cell D4 I am using looks something like this (in theory):

    =IF( “Reference to Cell D2 I cant get to work” !$M$3="",""",VLOOKUP(Summary!$B4, “Second reference to Cell D2 I can’t get to work” !$C$3:$R$25,11,FALSE))
    Where M3 is a check value on the other sheet where data entry starts.

    The reason I want to write the formula in this manner is so that I can then copy it over roughly 500 times which I would prefer to not have to change manually. The cell D2 would need to be a relative reference based on the location of my hypothetical cell D4.

    If anyone can help me figure out how to compile this formula so it works, I would be very grateful.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dynamic sheet reference based on adjacent cell values

    Replace this:

    “Reference to Cell D2 I cant get to work” !$M$3

    With this:

    INDIRECT("'"&D2&"'!M3")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    06-06-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    13

    Re: Dynamic sheet reference based on adjacent cell values

    Tony,

    Thank you for the quick reply, that worked brilliantly for the first error I was encountering. I am having some challenges extrapolating that to the second reference inside of my vlookup formula. Can you provide any guidance on that section?

    Thank you!

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dynamic sheet reference based on adjacent cell values

    Maybe this...

    =IF(INDIRECT("'"&D2&"'!M3")="","",VLOOKUP(Summary!$B4,INDIRECT("'"&D2&"'!C3:R25"),11,0))

  5. #5
    Registered User
    Join Date
    06-06-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    13

    Re: Dynamic sheet reference based on adjacent cell values

    That is beautiful. Thank you so much for all your help!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dynamic sheet reference based on adjacent cell values

    You're welcome. 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. [SOLVED] Using VBA to Reference a Dynamic Range based on Last Cell of an Adjacent Column
    By PW11 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2014, 02:16 AM
  2. [SOLVED] VBA help needed to Fill cell values based on Adjacent Cell values
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-06-2014, 07:08 AM
  3. [SOLVED] Generating values in number of cells based on adjacent cell values
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2014, 04:34 PM
  4. [SOLVED] Adding values based on value of adjacent cell...
    By Finalfrontier1976 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-13-2013, 09:20 AM
  5. Replies: 0
    Last Post: 07-18-2012, 10:28 AM
  6. Dynamic Formula Ranges with reference to values in another cell
    By dunda1985 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2011, 05:08 AM
  7. Replies: 0
    Last Post: 06-16-2011, 09:46 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