How to Return a Value Based on a Row Number in Another Cell in WPS Spreadsheet
Question details
The user wants to retrieve data from a specific column dynamically by referencing a row number that is input into a separate cell.

- Product
- WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Looking up and returning a value dynamically when the target row number changes in another cell.
- Observed behavior
- The result needs to update automatically to display the value from column A corresponding to the row number provided in cell B2.
Ensure your dataset does not have blank rows at the top that might misalign your expected row numbers, and confirm the cell containing the row number is formatted as a Number.
Use the INDEX Function (Recommended)
The INDEX function is the most efficient way to return a value based on a dynamic row number without slowing down your spreadsheet.
The INDEX function looks at a given range (like an entire column) and returns the value at the intersection of the specified row and column. It is highly efficient and preferred over volatile functions like INDIRECT.
Click on the empty cell where you want the final value to appear (for example, cell C3).
Type the formula =INDEX(A:A, B2) into the cell or the formula bar. Here, A:A is the column containing your data, and B2 is the cell containing the row number.
Hit Enter on your keyboard. If cell B2 contains the number 10, the formula will fetch and display the value from cell A10.
Change the number in cell B2. The formula result will automatically update to reflect the new row's value.

Use the INDIRECT Function
An alternative method using INDIRECT by constructing a cell reference as text.
Easily Manage Dynamic Data with WPS Spreadsheet
WPS Office offers a powerful and intuitive Spreadsheet application that fully supports advanced lookup and reference formulas like INDEX and INDIRECT, making dynamic data management effortless.
- 1. Download and Install WPS Office: Get the free WPS Office suite from the official website and install it on your device.
- 2. Open your Spreadsheet: Launch WPS Spreadsheet and open your existing workbook or create a new one.
- 3. Use the Formula Tab: Navigate to the Formulas tab to easily insert functions like INDEX, or type them directly into the formula bar.

Frequently Asked Questions
Why is INDEX preferred over INDIRECT for row lookups?
INDEX is a non-volatile function, meaning it only recalculates when the specific data it references changes. INDIRECT is volatile and recalculates upon any change in the entire workbook, which can significantly slow down performance in large files.
Can I return a value from a specific row and column simultaneously?
Yes, the INDEX function can take both row and column arguments. For example, =INDEX(A1:D100, B2, C2) will return the value at the row specified in B2 and the column specified in C2 within the range A1:D100.
What happens if the row number cell is empty?
If the cell containing the row number (e.g., B2) is empty, the INDEX function treats it as a 0. Depending on the exact formula setup, this may result in a #VALUE! error or return an array of the entire column. Ensure the reference cell contains a valid positive integer.




