Function Problems

Use INDEX and MATCH for a Right-to-Left Lookup in Excel

Adam DavisAdam Davis Nov 27, 2026 871 views

Question details

Find a search key in one Excel column and return the corresponding value from a column to its left.

Use INDEX and MATCH for a Right-to-Left Lookup in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

In Excel, click the cell where you want the lookup result to appear.

2
Enter the formula

Type =INDEX($F$2:$F$100,MATCH(A2,$O$2:$O$100,0),1) in the selected cell or formula bar.

3
Confirm the result

Press Enter. Excel searches O2:O100 for an exact match to A2 and returns the corresponding value from F2:F100.

4
Apply it to other rows

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.

Use INDEX and MATCH to return a value from a column to the left
If no match is found: The formula returns #N/A when A2 is not found in O2:O100. Check for differences such as extra spaces or numbers stored as text.
WPS Spreadsheet

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. 1. Open the workbook: Launch WPS Spreadsheet and use Open to select your Excel workbook.
  2. 2. Select a result cell: Click the cell where you want the lookup result to appear.
  3. 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. 4. Calculate and save: Press Enter to see the result, then use File > Save to save the workbook.
Look up values to the left or right with INDEX and MATCHOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceWork with a free, lightweight office suite
microsoft office alternative - wps office

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.