SUMPRODUCT returns 0

Gary Berndt 0 Reputation points
2026-06-08T19:53:19.9766667+00:00

I have the following SUMPRODUCT formula: =IFERROR(SUMPRODUCT(SUMIFS(INDIRECT("'"&rngWorksheets&"'!"&H$26),INDIRECT("'"&rngWorksheets&"'!$L:$L"),$Q$5,

INDIRECT("'"&rngWorksheets&"'!$M:$M"),$B11)),)

It had worked as it should for years, but now it returns a value of 0. The calculation is set to Automatic; if I select Calculate Sheet the correct value is returned, but if I save the workbook the value reverts to 0.

Below are the final three steps in the Evaluate Formula process. Removing the "IFERROR" function has no effect, a value of 0 is returned. I can't understand why the correct value of 3365.5 is not returned.

Any insight would be appreciated.

Thanks.

User's image

User's image

User's image

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. Marcin Policht 95,355 Reputation points MVP Volunteer Moderator
    2026-06-08T22:00:20.8966667+00:00

    As far as I can tell, this might be caused by the combination of SUMIFS, INDIRECT, and an array of worksheet names inside SUMPRODUCT. Excel will often evaluate that construction incorrectly during workbook open/save recalculation and cache the result as 0 until a forced recalculation occurs.

    Your formula might be working after Calculate Sheet because that command forces Excel to fully resolve the INDIRECT references. During normal recalculation, especially after reopening or saving, Excel sometimes evaluates the SUMIFS array portion before the INDIRECT references are fully resolved, so SUMPRODUCT receives an array of zeros.

    Try replacing SUMIFS with SUMPRODUCT in

    SUMIFS(
        INDIRECT("'"&rngWorksheets&"'!"&H$26),
        INDIRECT("'"&rngWorksheets&"'!$L:$L"),$Q$5,
        INDIRECT("'"&rngWorksheets&"'!$M:$M"),$B11
    )
    

    so it looks like this:

    =SUMPRODUCT(
    SUMPRODUCT(
    (INDIRECT("'"&rngWorksheets&"'!$L:$L")=$Q$5)*
    (INDIRECT("'"&rngWorksheets&"'!$M:$M")=$B11)*
    INDIRECT("'"&rngWorksheets&"'!"&H$26)
    ))
    

    If performance becomes slow, avoid full-column references inside INDIRECT. Full-column arrays combined with volatile functions are very calculation-intensive and can trigger unstable recalc behavior. Limiting the ranges might improve reliability:

    =SUMPRODUCT(
    SUMPRODUCT(
    (INDIRECT("'"&rngWorksheets&"'!$L$1:$L$5000")=$Q$5)*
    (INDIRECT("'"&rngWorksheets&"'!$M$1:$M$5000")=$B11)*
    INDIRECT("'"&rngWorksheets&"'!"&H$26)
    ))
    

    Another thing worth checking is whether H$26 sometimes resolves to an entire-column reference. If H$26 contains something like $N:$N, Excel can behave unpredictably when that is passed through INDIRECT into SUMIFS.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.