+ Reply to Thread
Results 1 to 5 of 5

Reference Cell or Date within formula workbook link

  1. #1
    Registered User
    Join Date
    11-12-2014
    Location
    Glos, England
    MS-Off Ver
    MS Office 2007
    Posts
    14

    Reference Cell or Date within formula workbook link

    Hi,

    Not sure if this can be achieved via formula alone or whether VBA is required. However what I am looking to do is link within a formula that references a workbook which contains a date.

    To add some more context, I get a new excel file daily produced from a Access database via SAS, these files contain daily volume figures that I want to reference into a capacity worksheet to measure capacity vs volume.

    Note that these files I am wanting to plot in advance before they even exist for the the entire year.

    The file format will be something like this 'Volumes (01JAN15).xlsx' and the to make it further complicated the day is always 1 day negative so on my capacity I would be referencing in column that is for 02/02/15 but wanting to extract data from the file that contains a date from the previous day.

    Ok so if i put this into an actual formula - not necessairly the one at this stage I will use as SUMIF is not great for linking to closed workbooks but just for example at this stage.

    =SUMIF('[Volumes (01JAN15).xlsx]North_Region'!$A$2:$A$16,"Volumes",'[Volumes (01JAN15).xlsx]North_Region'!$C$2:$C$16)

    I have tried putting the dates in excel cells above the columns that my formula is contained in and referring it is as a cell so something like

    =SUMIF("'[Volumes"&"(A3)"&".xlsx]North_Region'"!$A$2:$A$16,"Volumes","'[Volumes"&"(A3)"&".xlsx]North_Region'"!$C$2:$C$16)

    Where (A3) = (01JAN15)

    Which unfortunately did not work. I am also wondering if I will need to use something like (IF(ISERROR(my formula)),"-",(my formula)) as the files will not exist until that date occurs.

    Any help would be greatly appreciated as this could save me considerable time and also I think it raises an interesting topic which I have not been able to find any posts on the web anywhere about.

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

    Re: Reference Cell or Date within formula workbook link

    If you want to link to another workbook, using a cell ref containing that WB name, you need to use INDIRECT(). However, INDIRECT() only works on open WB's. Perhaps take a look at the Morefunc add-on for that?

    Not sure why you say SUMIF is not great for linking to closed WB's, it works just fone for that
    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
    Registered User
    Join Date
    11-12-2014
    Location
    Glos, England
    MS-Off Ver
    MS Office 2007
    Posts
    14

    Re: Reference Cell or Date within formula workbook link

    Thanks for the quick reply Ford, I will look into the MoreFunc addon you mention. When i've used SUMIF to link to a closed workbook it works fine when the workbook is initially open but as soon as it closes i get #N/A appear as a result. I did some searching around and there appeared to be a general consensus of SUMIF not working with closed workbooks and to use SUMPRODUCT instead. Have I missed something here?

    Thanks

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

    Re: Reference Cell or Date within formula workbook link

    Sorry, I was mistaken, SUMIF() also only works on open WB's, I guess I have always had the sourse file open

  5. #5
    Registered User
    Join Date
    11-12-2014
    Location
    Glos, England
    MS-Off Ver
    MS Office 2007
    Posts
    14

    Re: Reference Cell or Date within formula workbook link

    Thought I wasn't going mad, I'll post back if I come up with a solution...

+ 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. External Workbook Link with Dynamic Cell Reference
    By mst3kr in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-24-2014, 10:24 PM
  2. Replies: 0
    Last Post: 09-23-2013, 05:59 PM
  3. Replies: 0
    Last Post: 06-01-2013, 05:04 AM
  4. Replies: 0
    Last Post: 10-11-2012, 10:48 PM
  5. De-link a cell reference in a formula.
    By Hari Prasadh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2005, 09:06 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