Function Problems

Return an Excel Cell Value from a Row Number and Address

Nimra MalikNimra Malik Dec 2, 2026 868 views

Question details

Return the value of a cell using a row number rather than displaying its address as text.

Return an Excel Cell Value from a Row Number and Address
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet stores a row number in P4, and the user wants the value from column M at that row.
Observed behavior
ADDRESS returns a text reference such as $M$722 instead of the value stored in that cell.
Before you start

Check that P4 contains a valid worksheet row number and that the value you want is in column M on the same sheet. Enter the formula in a cell other than the cell it refers to, to avoid a circular reference.

Solution 1Recommended

Use INDEX to return the value from column M

Use INDEX when the column is known and you want to retrieve a value without constructing a text address.

1
Select an output cell

In Excel, select an empty cell where you want the result to appear.

2
Enter the INDEX formula

Type =INDEX(M:M,P4) in the cell or formula bar and press Enter.

3
Check the result

If P4 contains 722, confirm that the formula returns the value from M722.

Use INDEX to return the value from column M
Why use INDEX?: INDEX avoids constructing a text address and is generally preferable because it does not require the volatile recalculation associated with INDIRECT.
Use WPS Spreadsheet

Return a Cell Value by Row Number in WPS Spreadsheet

Use INDEX in WPS Spreadsheet to retrieve the value from column M at the row specified in P4, then save the workbook in an Excel-compatible format.

  1. 1. Open the workbook: Open WPS Spreadsheet and use Open to select your workbook.
  2. 2. Check the row number: Select cell P4 and confirm that it contains the row number you want to look up.
  3. 3. Enter the formula: Select an empty cell, enter =INDEX(M:M,P4), and press Enter.
  4. 4. Save the workbook: Use File > Save or Save As to save the result, including in XLSX format if needed.
Retrieve a cell value using an INDEX formula and a row numberOpen and save Microsoft Excel XLSX workbooksEdit formulas in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does ADDRESS show $M$722 instead of the cell value?

ADDRESS returns a reference as text. Wrap it in INDIRECT, as in =INDIRECT(ADDRESS(P4,13)), or use =INDEX(M:M,P4) to return the value directly.

What does 13 mean in the ADDRESS formula?

In =ADDRESS(P4,13), 13 is the column number for column M, while P4 supplies the row number.

Which formula should I use for a large workbook?

When the column is known, start with =INDEX(M:M,P4). Unlike INDIRECT, INDEX does not require volatile recalculation.

Can I use the same INDEX formula in WPS Spreadsheet?

Yes. Open the workbook in WPS Spreadsheet, select an output cell, and enter =INDEX(M:M,P4) to return the value from column M at the specified row.