Use INDEX and MATCH for a Right-to-Left Lookup in Excel
Question details
Find a search key in one Excel column and return the corresponding value from a column to its left.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet has lookup values in column O and return values in column F.
- Observed behavior
- The desired lookup should match a value in column O and return the value from column F on the same row.
Identify the cell containing the search key and make sure the lookup and return ranges cover the same rows. In this example, the search key is in A2, the lookup range is O2:O100, and the return range is F2:F100.
Use INDEX and MATCH to return a value from a column to the left
Use this formula when the lookup column is to the right of the column containing the value you want to return.
MATCH finds the position of the search key in the lookup range, and INDEX returns the value at the same position in the return range. The worksheet display direction does not affect the formula.
In Excel, click the cell where you want the lookup result to appear.
Type =INDEX($F$2:$F$100,MATCH(A2,$O$2:$O$100,0),1) in the selected cell or formula bar.
Press Enter. Excel searches O2:O100 for an exact match to A2 and returns the corresponding value from F2:F100.
If you have more search keys below A2, drag the result cell's fill handle down. The A2 reference changes by row, while the lookup and return ranges stay fixed.

Perform the same lookup in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and use INDEX and MATCH to return a value from a column to the left of the lookup column.
- 1. Open the workbook: Launch WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Select a result cell: Click the cell where you want the lookup result to appear.
- 3. Enter the lookup formula: Type =INDEX($F$2:$F$100,MATCH(A2,$O$2:$O$100,0),1) in the cell or formula bar, adjusting the references for your data.
- 4. Calculate and save: Press Enter to see the result, then use File > Save to save the workbook.

Frequently Asked Questions
Does INDEX and MATCH work in a right-to-left worksheet?
Yes. INDEX and MATCH use cell references, so the worksheet's display direction does not change how the lookup works.
What does the 0 in MATCH mean?
In MATCH(A2,$O$2:$O$100,0), 0 requests an exact match for the value in A2.
What happens if the lookup column contains duplicates?
MATCH returns the position of the first exact match in O2:O100, so INDEX returns the corresponding value from column F.
Why does the formula return #N/A?
An exact match was not found. Check A2 and the values in O2:O100 for extra spaces, spelling differences, or numbers stored as text.




