Use a Text-Generated Cell Reference in an Excel Formula
Question details
Use a cell address generated as text as a reference in an Excel comparison formula.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula generates text such as E52, and the user wants to compare the value in the referenced cell.
- Observed behavior
- The desired formula should interpret the generated text as a cell address and return a result based on that cell's value.
Check that the generated text forms a valid cell address, such as E52. Decide which value you want to compare with the referenced cell and where to place the result.
Use INDIRECT to Convert Text into a Cell Reference
Use INDIRECT inside an IF formula to compare the value of a cell whose address is generated as text.
In Excel, select a cell in the row where you want the comparison result, such as F52.
In the formula bar, enter =IF(INDIRECT("E"&ROW())="EXAMPLE","Yes","No") and press Enter. In row 52, this compares E52 with EXAMPLE.
Replace E or EXAMPLE in the formula with your column or comparison text. If A1 already contains an address such as E52, use =IF(INDIRECT(A1)="EXAMPLE","Yes","No") instead.

Compare Text-Generated References in WPS Spreadsheet
Use INDIRECT and IF in WPS Spreadsheet to turn a text address into a cell reference and compare its value.
- 1. Open your workbook: Open WPS Spreadsheet and select Open to choose your Excel workbook.
- 2. Select a result cell: Click the cell where you want the comparison result, such as F52.
- 3. Enter the formula: In the formula bar, enter =IF(INDIRECT("E"&ROW())="EXAMPLE","Yes","No") and press Enter.
- 4. Adjust the comparison: Edit the column letter and comparison text in the formula bar to match your worksheet.

Frequently Asked Questions
How do I use a cell that contains E52 as a reference?
If A1 contains the text E52, enter =INDIRECT(A1) in another cell to return the value stored in E52.
What does ROW() do in the example formula?
ROW() returns the row number of the cell containing the formula. In row 52, "E"&ROW() produces the text E52, which INDIRECT interprets as a reference.
Why does INDIRECT return #REF!?
The text may not form a valid cell reference. Check the generated address in the source cell or formula bar for spelling errors and invalid row or column numbers.
Can INDIRECT slow down my workbook?
Yes. INDIRECT is volatile and recalculates whenever Excel recalculates, so using it extensively can affect performance in large workbooks.




