+ Reply to Thread
Results 1 to 4 of 4

Reference another workbook in a formula

  1. #1
    Registered User
    Join Date
    11-11-2009
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Reference another workbook in a formula

    I am having trouble inserting a cell reference into a formula. I have a spreadseet that uses data from another workbook. The workbook name changes monthly, so i'd like to be able to place the workbook name in a cell and have the formulas in the spreadsheet use that cell to get the name of the workbook to get the data from. So:

    if, for eg, the formula in my spreadsheet is ='[test data file.xlsx]Sheet1'!$B$4+'[test data file.xlsx]Sheet1'!$B$6

    I would like to be able to enter test dta file.xlsx into cell A2 of my spreadsheet and replace a reference to A2 into the formulas.
    I've tried several ways, but can't seem to get it to work.
    Any suggestions?
    Last edited by dlmeyers; 11-11-2009 at 04:01 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Reference another workbook in a formula

    =Indirect("'["&A2&".xlsx]Sheet1'!$B$4")+Indirect("'["&A2&".xlsx]Sheet1'!$B$6")

    but workbook must be open...

    if closed, need to install addin and use Morefunc.xll

    =Indirect.ext("'["&A2&".xlsx]Sheet1'!$B$4")+Indirect.ext("'["&A2&".xlsx]Sheet1'!$B$6")
    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.

  3. #3
    Registered User
    Join Date
    11-11-2009
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Reference another workbook in a formula

    Thank you. I had tried Indirect, but i guess didn't have the appropriate combination of "'s and brackets!!!!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Reference another workbook in a formula

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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