+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    09-23-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    2

    SUMIF formula only works when linked spreadhseet is open

    hi all,

    I have a SUMIF function in my 'main' workbook which is looking at data in a different 'source' workbook. When that source workbook is open, the formula works correctly, but when the source workbook isn't open, my SUMIF returns #VALUE!

    Any idea how I resolve this (opening the source workbook everytime as well as the main workbook is not an option)?

    Many thanks in advance...

  2. #2
    Forum Moderator teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    2003 & 2010
    Posts
    10,044

    Re: SUMIF formula only works when linked spreadhseet is open

    read http://support.microsoft.com/kb/260415

    A formula that contains the SUMIF, COUNTIF, or COUNTBLANK functions may return the #VALUE! error in Microsoft Excel.

    Note This behavior also applies to the Dfunctions, such as DAVERAGE, DCOUNT, DCOUNTA, DGET, DMAX, DMIN, DPRODUCT, DSTDEV, DSTDEVP, DSUM, DVAR, and DVARP.

    This behavior occurs when the formula that contains the SUMIF, COUNTIF, or COUNTBLANK function refers to cells in a closed workbook.

    Note If you open the referenced workbook, the formula works correctly.

    To work around this behavior, use a combination of the SUM and IF functions together in an array formula.
    Back to the top
    Examples
    Note You must enter each formula as an array formula. To enter a formula as an array formula in Microsoft Excel for Windows, press CTRL+SHIFT+ENTER.
    SUMIF
    Instead of using a formula that is similar to the following
    =SUMIF([Source]Sheet1!$A$1:$A$8,"a",[Source]Sheet1!$B$1:$B$8)
    use the following formula:
    =SUM(IF([Source]Sheet1!$A$1:$A$8="a",[Source]Sheet1!$B$1:$B$8,0))
    etc.
    teylyn
    Microsoft MVP - Excel
    At Excelforum, you can say "Thank you!" by clicking the icon below the post.

    Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.

  3. #3
    Registered User
    Join Date
    09-23-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: SUMIF formula only works when linked spreadhseet is open

    Hi Teylyn,

    Thanks for the quick response. I was hoping for a quicker solution but alas, not to be! The work-around should be OK though.

    cheers

    Jezza

  4. #4
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: SUMIF formula only works when linked spreadhseet is open

    Note also that you can also use SUMPRODUCT in these instances.

    There is some debate as to whether or not SUMPRODUCT is any quicker than a CSE Array (they are processed in similar fashion), however, there is one key difference between the two and that is (from an end users perspective) SUMPRODUCT is slightly more robust insofar as there is no need for CTRL + SHIFT + ENTER when committing the formula.

    Using the quote from teylyn's post:

    Code:
    =SUM(IF([Source]Sheet1!$A$1:$A$8="a",[Source]Sheet1!$B$1:$B$8,0))
    confirmed with CTRL + SHIFT + ENTER
    can be written in SUMPRODUCT terms as

    Code:
    =SUMPRODUCT(--([Source]Sheet1!$A$1:$A$8="a"),[Source]Sheet1!$B$1:$B$8)
    confirmed with ENTER as normal

  5. #5
    Registered User
    Join Date
    10-26-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: SUMIF formula only works when linked spreadhseet is open

    Hey guys,
    I have a smiliar problem. We're using SUMIF at work and it won't work unless the external excel file is open as well.

    This is the formula we're using:

    Code:
    =SUMIF('[Xl0000006.xls]RCF 09'!Provider_ID,B8,Xl0000006.xls!Beds)
    I've been reading that I would change it to SUMPRODUCT or another similar formula that doesn't have this issue but I have not had any luck.

    Do you guys have any suggestions?

    Thanks
    Last edited by Bond007; 10-26-2009 at 11:20 PM.

  6. #6
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: SUMIF formula only works when linked spreadhseet is open

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then start your own thread.

    Thanks.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    10-26-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: SUMIF formula only works when linked spreadhseet is open

    I apologize. Thought it would be better since it's the same exact problem. I'll start another one now.

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.2.0