Function Problems

Use a Text-Generated Cell Reference in an Excel Formula

Ayan MasoodAyan Masood Dec 2, 2026 868 views

Question details

Use a cell address generated as text as a reference in an Excel comparison formula.

Use a Text-Generated Cell Reference in an Excel 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.
Before you start

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.

Solution 1Recommended

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.

1
Select a result cell

In Excel, select a cell in the row where you want the comparison result, such as F52.

2
Enter the formula

In the formula bar, enter =IF(INDIRECT("E"&ROW())="EXAMPLE","Yes","No") and press Enter. In row 52, this compares E52 with EXAMPLE.

3
Adapt the reference

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.

Use INDIRECT to Convert Text into a Cell Reference
Performance and invalid references: INDIRECT is volatile, so many INDIRECT formulas can slow a large workbook. It returns a #REF! error if the text does not form a valid reference.
Work with formulas in WPS

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. 1. Open your workbook: Open WPS Spreadsheet and select Open to choose your Excel workbook.
  2. 2. Select a result cell: Click the cell where you want the comparison result, such as F52.
  3. 3. Enter the formula: In the formula bar, enter =IF(INDIRECT("E"&ROW())="EXAMPLE","Yes","No") and press Enter.
  4. 4. Adjust the comparison: Edit the column letter and comparison text in the formula bar to match your worksheet.
Convert generated cell addresses into usable references with INDIRECTOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface for formulasWork with spreadsheets for free
microsoft office alternative - wps office

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.