Function Problems

How to Return a Value Based on a Row Number in Another Cell in WPS Spreadsheet

Jason MillerJason Miller Nov 11, 2026 869 views

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.

How to Return a Value Based on a Row Number in Another 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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

Click on the empty cell where you want the final value to appear (for example, cell C3).

2
Enter the INDEX formula

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.

3
Press Enter to apply

Hit Enter on your keyboard. If cell B2 contains the number 10, the formula will fetch and display the value from cell A10.

4
Update the row number dynamically

Change the number in cell B2. The formula result will automatically update to reflect the new row's value.

Use the INDEX Function (Recommended)
Performance Tip: INDEX is a non-volatile function, meaning it only recalculates when its source data changes, making it much faster for large datasets.
WPS Spreadsheet Solutions

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. 1. Download and Install WPS Office: Get the free WPS Office suite from the official website and install it on your device.
  2. 2. Open your Spreadsheet: Launch WPS Spreadsheet and open your existing workbook or create a new one.
  3. 3. Use the Formula Tab: Navigate to the Formulas tab to easily insert functions like INDEX, or type them directly into the formula bar.
100% compatible with Microsoft Excel formulas and the .xlsx format.Built-in formula hints and syntax guides to help you write functions correctly.Lightweight application that handles large datasets smoothly without lagging.Free to download and use for all your daily spreadsheet tasks.
microsoft office alternative - wps office

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.