Excel Formula to Return an Adjacent Value When Text Matches
Question details
Find matching text in one range and return the related value from an adjacent column.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Match each text value in column D against a lookup list in column J and return the corresponding value from column I.
- Observed behavior
- Column E should show the value from column I on the row where column J matches the text in column D.
Check that D2:D11 contains the text to look up and that J2:J7 and I2:I7 contain the matching text and associated values on the same rows. Adjust the cell references in the formulas if your data uses different ranges.
Use XLOOKUP to Return the Matching Value
Use this formula in Microsoft 365 or Excel 2021 to look up text in column J and return the corresponding value from column I.
Select cell E2, enter =XLOOKUP(D2,$J$2:$J$7,$I$2:$I$7,"") and press Enter.
Select E2 and drag its fill handle down through E11. Each row will look up its own value from column D.

Use INDEX and MATCH in Older Excel Versions
Use this alternative when XLOOKUP is not available in your version of Excel.
Return Matching Values with WPS Spreadsheet
Use INDEX and MATCH in WPS Spreadsheet to find text in one column and return the related value from another.
- 1. Open the workbook: Open WPS Spreadsheet and select Open to choose your Excel workbook.
- 2. Check the ranges: Confirm that the lookup text is in D2:D11, the matching list is in J2:J7, and the related values are in I2:I7.
- 3. Enter the formula: Select E2, enter =IFERROR(INDEX($I$2:$I$7,MATCH(D2,$J$2:$J$7,0)),"") and press Enter.
- 4. Fill the results: Drag the fill handle from E2 through E11, then use Save to save the workbook.

Frequently Asked Questions
Can I return a value from a column to the left of the matching text?
Yes. Both formulas search J2:J7 and return the corresponding value from I2:I7, even though column I is to the left of column J.
What happens if the lookup text appears more than once?
XLOOKUP and MATCH return the first matching row in the specified lookup range.
Why does the result cell appear blank?
The formulas are set to return a blank when no match is found. Check that the text in D2 matches an entry in J2:J7 and that there are no unintended spaces.
Are these text matches case-sensitive?
No. XLOOKUP and MATCH perform case-insensitive text matching with the formulas shown.




