+ Reply to Thread
Results 1 to 2 of 2

Hard: Using a cell as a reference for another Workbook?

  1. #1
    Registered User
    Join Date
    06-01-2008
    Posts
    2

    Hard: Using a cell as a reference for another Workbook?

    I'm stumpped. I have two workbooks, and I'm trying to create a formula that does not require me to type out the full name of the workbook that I'm trying to cross reference. Instead I'm wondering if I can create a table with the list of possible workbook names so that it can auto-update each year. Also, I need help with the same situation with a named range.

    Let's say I have two workbooks: workbookA and workbookB. Let's say workbookA is my master database (so the data changes a lot, especially when a new year starts). I use workbookB to reference information in workbookA.

    Let's say that within workbookA I have a few named rages called: rangeA1, rangeA2, and rangeA3.

    Inside workbookB this is my standard formula:

    =vlookup(something,'workbookA.xls'!rangeA1,2,false)

    What I would like to do is replace 'workbookA.xls' with a cell vaule that I can update easily. And the same goes for !rangeA1. Or, if I could replace the whole thing....'workbookA.xls'!rangeA1....and reference that to a cell containing that same text, that would work for me too.

    I have a whole bunch of vlookup formulas contained in workbookB, and so it would be a lot easier for me to just have one place where I can update the workbook name and/or the named ranges when needed. For example, I often need to reference rangeA2 or rangeA3 quickly. (I know that I can use the Find and Replace tool, but I'd prefer not to if possible. Also, I've tried using the INDIRECT function, but I later realized that it only works if workbookA is open....and I don't want to open workbookA everytime I'm using workbookB).

    I hope there's a cool trick out there that I could use! Thanks for reading!
    -g/money

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you download and install the free Morefunc.dll addin from here: http://xcell05.free.fr/english/ then you can use the INDIRECT.EXT function to replace the INDIRECT function....

    This allows workbooks to be closed.


    Another option might be... that if you are returning numbers from your Vlookup and there is only one match to your "Something" in your Vlookup, then you can possibly replace your Vlookup with a Sumproduct() function which works with closed workbooks.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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