Function Problems

Why Excel INDIRECT Cannot Execute a Formula Text String & How to Fix It

John WilsonJohn Wilson Oct 21, 2026 872 views

Question details

The user wants to dynamically change sheet names in existing formulas using INDIRECT alongside SUBSTITUTE and FORMULATEXT, but the formula fails to execute the resulting text string.

Why Excel INDIRECT Cannot Execute a Formula Text String & How to Fix It
Product
Excel
Device & OS
not provided
Scenario
Attempting to dynamically update worksheet references within complex formulas by extracting the formula text, substituting the old sheet name for a new one, and evaluating it.
Observed behavior
The INDIRECT function fails to convert the complete formula string into an executable formula, resulting in a VALUE or REF error.
Before you start

Before proceeding with bulk updates to your formulas, ensure you understand which specific sheet references need to be replaced and verify that the target sheets already exist in your workbook.

Solution 1Recommended

Use Find and Replace to Update Sheet Names in Formulas

Since INDIRECT can only convert text into a range reference and cannot execute full formula strings, using Find and Replace is the most reliable way to update sheet references.

The INDIRECT function is strictly designed to parse references (like 'Sheet2!A1') from text. When you pass a full mathematical formula (e.g., '=SUM(A1:A10)') generated by FORMULATEXT into INDIRECT, Excel cannot process it, leading to calculation errors.

1
Copy Original Formulas

Select the cells containing the formulas you want to update (for example, in columns H and I) and press Ctrl + C to copy them.

2
Paste to Target Location

Select your destination cells (for example, columns J and K) and press Ctrl + V to paste the formulas.

3
Open Find and Replace

Keep the newly pasted cells highlighted, then press Ctrl + H to open the Find and Replace dialog box.

4
Replace the Sheet Name

In the 'Find what' field, type the old sheet name (e.g., '1190Mx'). In the 'Replace with' field, type the new sheet name (e.g., '1190Nx').

5
Execute the Replacement

Click 'Replace All' to instantly update all sheet references within the selected formulas without causing calculation errors.

Use Find and Replace to Update Sheet Names in Formulas
Tip: Using Find and Replace instead of volatile functions like INDIRECT also improves your workbook's performance, as volatile functions recalculate every time any change is made to the file.
Efficient Formula Management

Easily Manage and Update Complex Formulas with WPS Office

WPS Spreadsheet provides powerful data processing capabilities and an advanced Find and Replace tool, making it incredibly simple to update sheet references across large datasets without relying on complex, error-prone formula workarounds.

  1. 1. Open Your Spreadsheet: Launch WPS Spreadsheet and open the workbook containing the formulas you need to modify.
  2. 2. Copy and Paste: Highlight the formula cells, copy them, and paste them into the desired new columns.
  3. 3. Launch the Replace Tool: Select the newly pasted cells and press Ctrl + H to bring up the Replace window.
  4. 4. Update References: Enter the old sheet reference and the new sheet reference, then click 'Replace All' for a seamless update.
Fully compatible with Microsoft Excel (.xlsx) formats and formulasAdvanced Find and Replace tools for quick bulk editsFree, lightweight, and fast performance on large datasetsFamiliar user interface requiring no learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why does INDIRECT return a #REF! or #VALUE! error when evaluating formula text?

The INDIRECT function is designed exclusively to convert a text string into a valid cell or range reference (such as 'A1' or 'Sheet1!B2'). It cannot evaluate or execute mathematical operations, nested functions, or full formulas stored as text.

How can I dynamically change sheet names in a formula without using Find and Replace?

To do this dynamically, you must structure the formula so that INDIRECT only handles the cell reference portion. For example, instead of wrapping the entire formula, use it just for the reference: =SUM(INDIRECT("'" & A1 & "'!B2:B10")), where cell A1 contains your dynamic sheet name.

Can I use EVALUATE to calculate a formula stored as text?

Standard Excel worksheet cells do not have a built-in EVALUATE function. EVALUATE is a legacy Excel 4.0 macro function that can only be used by creating a Named Range and requires saving the file as a macro-enabled workbook (.xlsm).