Fix SUMIFS Returning Zero When External Workbook is Closed
Question details
The user is experiencing an issue where a SUMIFS formula linked to an external workbook calculates correctly when the source file is open but returns a zero when the source file is closed.

- Product
- Spreadsheet software
- Device & OS
- not provided
- Scenario
- Calculating conditional sums using SUMIFS with data ranges located in a separate, external workbook.
- Observed behavior
- The formula evaluates to zero (or throws an error) when the external source workbook is closed, despite functioning perfectly when it remains open.
Verify the exact file path of your external workbooks and ensure you have sufficient permissions to read the source files before modifying your spreadsheet formulas.
Use Helper Cells to Link External Data First
This is the most reliable workaround. By linking the external data to a separate cell or column in your active workbook first, you bypass the closed-workbook limitation.
Certain conditional functions, including SUMIF and SUMIFS, cannot evaluate data ranges in external files unless those files are actively loaded into the computer's memory. Bringing the data into your current workbook resolves this limitation.
In your current active workbook, insert a new column or select an unused area to act as your helper data source.
In the first cell of your helper column, type an equals sign (=), navigate to the external workbook, and select the corresponding cell to create a direct link (e.g., =[ExternalFile.xlsx]Sheet1!A1). Drag this down to populate the entire range.
Modify your existing SUMIFS formula to reference the new helper column inside your active workbook instead of the external workbook. The calculation will now work regardless of whether the external file is open.

Alternative: Use the SUMPRODUCT Function
SUMPRODUCT is an array-processing function that natively supports querying closed external workbooks without returning a zero.
Master Complex Formulas with WPS Spreadsheet
WPS Spreadsheet provides robust support for complex data functions, making it easy to handle external data links, array formulas like SUMPRODUCT, and cross-workbook referencing smoothly.
- 1. Download and Install: Get the free WPS Office suite from the official website and install it on your device.
- 2. Open Your Workbooks: Launch WPS Spreadsheet and open both your main and external workbooks to set up your initial data links.
- 3. Apply Formulas Seamlessly: Use powerful functions like SUMPRODUCT or easily manage data links through the 'Data' tab to calculate complex conditional sums.

Frequently Asked Questions
Why does SUMIFS suddenly stop working when I close the source file?
Functions like SUMIF, SUMIFS, COUNTIF, and COUNTIFS are designed to evaluate ranges in active memory. Once the source workbook is closed, the spreadsheet software can no longer evaluate the conditional logic on the external file, causing it to return a zero or #VALUE! error.
Are there other spreadsheet functions affected by closed workbooks?
Yes. Aside from the SUMIF and COUNTIF families, functions such as INDIRECT, OFFSET, and COUNTBLANK also require the referenced external workbook to remain open to calculate successfully.
Can I force external links to update without opening the file?
You can go to the 'Data' tab, click 'Edit Links', and select 'Update Values' to refresh standard data links. However, conditional functions like SUMIFS will still fail to evaluate properly unless the file is physically opened or you use a SUMPRODUCT workaround.




