+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Excel - Reference data from another worksheet without using worksheet name in formula

  1. #1
    Registered User
    Join Date
    02-06-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Excel - Reference data from another worksheet without using worksheet name in formula

    I have the following formula, and it works great...but when my boss
    adds a new Job Number to the Summary tab, he will have to edit the
    formula to reference the correct worksheet. I was wondering if there
    was a way to change the worksheet reference by typing into a specific
    cell on the current worksheet?

    =VLOOKUP($D8,'GT206 3.1.1'!$B$4:$H$31,2,FALSE)

    D8 is the employee name
    GT206 3.1.1 is the JN worksheet
    B$4:H31 are the columns....5 columns for each week of month
    2 is the column return for the week needed

    I want to replace'GT206 3.1.1'! with some reference on the worksheet
    rather than hardcoded in the formula

    I tried using this forumla, but keep getting a #REF error...
    =VLOOKUP($D8,(INDIRECT(D4&"!b6:h300")),2,FALSE)

    Let me know if this doesn't make any sense!

    thanks!
    Last edited by Christy :); 02-06-2012 at 12:46 PM.

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Excel - Reference data from another worksheet without using worksheet name in for

    =VLOOKUP($D8,INDIRECT("'"&D4&"'!b6:h300"),2,FALSE)
    ought to work. You require the single quotes around the sheet name if it contains spaces (or looks like a date).
    Good luck.

  3. #3
    Registered User
    Join Date
    02-06-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel - Reference data from another worksheet without using worksheet name in for

    Thanks for the suggestion, however, I'm still getting the #REF error. I also noticed that excel isn't automatically capitalizing the b6:h300...like it isn't recognizing the formula? Is there a problem using the vlookup and indirect together?

  4. #4
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Excel - Reference data from another worksheet without using worksheet name in for

    If you are getting a #REF error then the worksheet name does not match an actual worksheet. (the range address will not be capitalised as it is just text)

  5. #5
    Registered User
    Join Date
    02-06-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel - Reference data from another worksheet without using worksheet name in for

    you were right - I had forgotten I had put the name in quotes thinking that was the problem....Thank you so much

  6. #6
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Excel - Reference data from another worksheet without using worksheet name in for

    My pleasure.

    Please do not forget to mark the thread Solved (see FAQ link at top of the page for instructions).

+ 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