Return an Excel Cell Value from a Row Number and Address
Question details
Return the value of a cell using a row number rather than displaying its address as text.

- 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.
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.
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.
In Excel, select an empty cell where you want the result to appear.
Type =INDEX(M:M,P4) in the cell or formula bar and press Enter.
If P4 contains 722, confirm that the formula returns the value from M722.

Convert the ADDRESS result into a reference with INDIRECT
Use INDIRECT when you need to turn an address generated as text into a cell reference.
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. Open the workbook: Open WPS Spreadsheet and use Open to select your workbook.
- 2. Check the row number: Select cell P4 and confirm that it contains the row number you want to look up.
- 3. Enter the formula: Select an empty cell, enter =INDEX(M:M,P4), and press Enter.
- 4. Save the workbook: Use File > Save or Save As to save the result, including in XLSX format if needed.

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.




