Excel Error Codes

Fix Excel #VALUE! Errors When a Source Workbook Is Closed

Anum MushtaqAnum Mushtaq Dec 2, 2026 869 views

Question details

The user needs an Excel formula to retrieve or calculate values from a source workbook after it is closed.

Fix Excel #VALUE! Errors When a Source Workbook Is Closed
Product
Microsoft Excel
Device & OS
not provided
Scenario
A formula references a separate, read-only workbook that may not remain open.
Observed behavior
The formula returns the expected values while the source workbook is open but shows #VALUE! after it is closed.
Before you start

Open both workbooks and check the formula for INDIRECT or a criteria function such as COUNTIF. Confirm that the source file path is valid and that you have permission to read the workbook; read-only status alone does not explain the error.

Solution 1Recommended

Replace INDIRECT with a direct external reference

Use a direct link when the formula needs a known cell or range from the source workbook.

INDIRECT cannot resolve a reference to a closed external workbook. A direct external reference can retrieve saved values without keeping the source open.

1
Select the formula cell

Open both workbooks, select the destination cell, and inspect its formula in the formula bar for INDIRECT.

2
Create a direct link

Replace the INDIRECT expression by typing =, selecting the source workbook and the required cell, and pressing Enter. Excel creates an external reference such as ='[Source.xlsx]Sheet1'!$B$2.

3
Test the closed source

Save and close the source workbook, then recalculate the destination workbook. Excel may expand the reference to include the source file path.

4
Check the link if needed

If the result is still wrong, open Data > Workbook Links or Data > Edit Links, depending on your Excel version, and check or change the source path.

Dynamic references: A direct reference works best when the target is known. If INDIRECT builds changing cell addresses from text, you may need to redesign the formula or import the source data.
Free Microsoft Office alternative

Work with Linked Spreadsheets in WPS Office

WPS Office is a free, lightweight, easy-to-use alternative with a familiar spreadsheet interface and support for common Excel formats, making it easier to move existing files. It does not repair an Excel-specific formula error.

Open and edit spreadsheets with a familiar interface.Work with Microsoft Excel XLSX and XLS files.Review spreadsheet formulas and source data in WPS Spreadsheets.Move existing Office documents into a lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why does INDIRECT return #VALUE! when the source workbook closes?

Excel's INDIRECT function cannot resolve a reference to a closed external workbook. Replace it with a direct external reference where the target cell or range is known.

Does read-only access cause the formula error?

Read-only access alone is not necessarily the cause. Check whether the formula uses INDIRECT or a criteria function that cannot reliably read a closed external range, and confirm that the source path is accessible.

What can I use instead of COUNTIF with a closed workbook?

For a simple count, try SUMPRODUCT with a direct, bounded external range. Alternatively, calculate the count in the source workbook, save it, and link directly to the result cell.

How do I update data imported with Power Query?

In the destination workbook, choose Data > Refresh All. The source file must be available at the location used by the query.

Where can I check a broken external workbook link?

Open Data > Workbook Links or Data > Edit Links, depending on your Excel version, and review the source location. Update the source if the file has moved.