logo
search
Formula Errors

How to Fix Excel Formulas That Fail When the Source Workbook is Closed

Elise WilliamsElise Williams Oct 8, 2026 869 views

Question details

Users need a workaround for Excel formulas that break or return errors when referencing external data in a closed source workbook.

How to Fix Excel Formulas That Fail When the Source Workbook is Closed
Product
Microsoft Excel
Device & OS
not provided
Scenario
Aggregating or analyzing data across multiple workbooks where keeping all source files open simultaneously is not feasible.
Observed behavior
Certain functions, particularly SUMIFS, COUNTIFS, and INDIRECT, return a #VALUE! or #REF! error instead of the calculated result when the referenced external workbook is closed.
Before you start

Before modifying your formulas, locate the exact file path, file name, and worksheet names of your external source data, as any typos in the file path will cause the new references to fail.

Solution 1Recommended

Use Power Query to Import and Calculate Data

Power Query securely connects to external workbooks without needing them open, avoiding the inherent limitations of closed-workbook formulas.

Functions like SUMIFS and COUNTIFS inherently fail when linked to closed workbooks because they cannot pull dynamic arrays from inactive files. Power Query provides a robust, native solution by directly extracting and processing the external data in the background.

1
Access Power Query

Open your destination Excel workbook and navigate to the 'Data' tab on the ribbon.

2
Connect to the Source File

Click on 'Get Data' (or 'New Query'), select 'From File', and then choose 'From Workbook'.

3
Import the Data

Browse to the location of your closed source workbook, select the file, and click 'Import'.

4
Transform and Load

In the Navigator window, select the specific sheet containing your source data and click 'Transform Data' to filter it. Once ready, click 'Close & Load' to output the data into your current workbook where you can safely run SUMIFS.

Use Power Query to Import and Calculate Data
Reliability: Data imported via Power Query can be easily updated by simply clicking 'Refresh All' on the Data tab, even while the source file remains closed.
Free Microsoft Office alternative

Experience Seamless Data Management with WPS Office

Tired of dealing with complex Excel errors and broken external links? WPS Office offers a lightweight, free, and fully compatible alternative to Microsoft Office. Enjoy a familiar interface and comprehensive spreadsheet features without the heavy subscription costs.

  1. 1. Download and Install: Get WPS Office for free from the official website and install it on your computer.
  2. 2. Open Your Excel File: Launch WPS Spreadsheet and open your existing .xlsx workbooks directly without losing any formatting or data.
  3. 3. Manage Your Data: Use WPS Spreadsheet's intuitive formula tools to link, calculate, and analyze your data seamlessly.
Fully compatible with Microsoft Excel formats including .xlsx, .xls, and .csv.Advanced formula support and built-in data analysis tools.Lightweight architecture ensures fast opening and calculation of complex workbooks.Free to use with a highly familiar user interface requiring zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the SUMIFS function return a #VALUE! error when the source file is closed?

Functions like SUMIFS, COUNTIFS, and AVERAGEIFS are designed to evaluate ranges dynamically. When the external workbook is closed, the spreadsheet application cannot retrieve the necessary array elements in real-time, resulting in a #VALUE! error.

Does the INDIRECT function work with closed workbooks?

No, the INDIRECT function will always return a #REF! error if the workbook it references is closed. You must either keep the source file open or use data import tools like Power Query.

Can I link to a closed workbook using a basic cell reference?

Yes, standard cell references (e.g., ='C:\[Source.xlsx]Sheet1'!A1) will work perfectly even when the source workbook is closed. The closed-workbook limitation primarily affects complex array formulas and specific conditional functions.

How do I manually update links to an external workbook?

Navigate to the 'Data' tab, click on 'Edit Links' (or 'Queries & Connections'), select your linked source file from the list, and click 'Update Values' to manually refresh the data pulled from the closed workbook.