Use IFERROR with an External Workbook Reference in Excel
Question details
The user wants to wrap an external workbook reference in IFERROR and display a custom result when the reference returns an error.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula in one workbook needs to retrieve a cell value from another workbook and show a fallback message for an error.
- Observed behavior
- The desired formula returns the linked cell value when available and custom text when the reference evaluates to an error.
Identify the source workbook, worksheet, and cell you want to reference. Open both workbooks if possible so Excel can help create the external reference.
Wrap the External Reference in Excel's IFERROR Function
Use IFERROR to replace an error returned by an external cell reference with your own message.
In the destination workbook, click the cell where you want the linked value to appear.
Type =IFERROR('[testworkbook.xlsx]Sheet1'!D7,"Error") in the formula bar and press Enter. Replace the workbook name, sheet name, cell address, and message with your own.
If needed, open the source workbook and build a reference by typing = in the destination cell, switching to the source workbook, and clicking the source cell. Then edit the generated reference in the formula bar to wrap it in IFERROR.
In an empty cell, enter =IFERROR(1/0,"Error") to confirm that IFERROR displays the message when its first argument returns an error.

Use IFERROR for Linked Cells in WPS Spreadsheets
In WPS Spreadsheets, wrap a supported external workbook reference in IFERROR to show a custom message when the formula returns an error.
- 1. Open both workbooks: In WPS Spreadsheets, use File > Open to open the source and destination workbooks.
- 2. Create the link: Click a destination cell, type =, switch to the source workbook, and click the cell you want to reference.
- 3. Add IFERROR: Edit the generated reference in the formula bar by placing IFERROR( before it and ,"Error") after it, then press Enter.
- 4. Check the result: Review the destination cell and respond to any link-update prompt. To test the fallback separately, enter =IFERROR(1/0,"Error") in an empty cell.

Frequently Asked Questions
What is the correct IFERROR syntax for an external workbook?
Use =IFERROR('[testworkbook.xlsx]Sheet1'!D7,"Error"), replacing the workbook name, sheet name, cell, and fallback text as needed.
Do I need single quotes around the workbook and sheet name?
Single quotes are safe to use around the workbook and sheet portion, as in '[testworkbook.xlsx]Sheet1'!D7. They are especially useful when names contain spaces.
Will IFERROR always show my message if the source workbook is missing?
No. IFERROR shows the message only when the formula evaluates to an error. Excel may instead prompt you to update the link or show a cached value.
Why does Excel reject my formula?
Check the square brackets around the workbook name, the single quotes around the workbook and sheet portion, and the double quotes around the fallback text. Depending on your regional settings, you may need a semicolon instead of a comma between arguments.




