Find Text in an Excel Cell and Return an Adjacent Value
Question details
Find a lookup value embedded in cells containing multiple items and return the corresponding value from an adjacent range.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains comma- or slash-separated items in one range and associated values in an adjacent range.
- Observed behavior
- The desired result is the adjacent value from the first row whose cell contains the lookup text.
Identify the lookup cell, the cells to search, and the adjacent return range. Make sure the two ranges cover corresponding rows and the lookup cell is not blank.
Use INDEX and MATCH to return a value beside matching text
Use this formula to find the first cell containing the lookup text and return the value from the corresponding row.
SEARCH finds text within a cell, ISNUMBER converts the result to TRUE or FALSE, and MATCH locates the first TRUE result. INDEX then returns the value from the same position in the adjacent range.
Place the lookup text in G10, the cells to search in I10:I12, and the corresponding return values in J10:J12. Adjust these references if your data is elsewhere.
Select an empty result cell and enter =INDEX(J10:J12,MATCH(TRUE,ISNUMBER(SEARCH(G10,I10:I12)),0)).
Press Enter in Microsoft 365 or Excel 2021. In older Excel versions, press Ctrl+Shift+Enter to confirm it as an array formula.

Find text and return adjacent values in WPS Spreadsheets
Use a helper column in WPS Spreadsheets to identify cells containing the lookup text, then return the corresponding adjacent value with INDEX and MATCH.
- 1. Open the worksheet: Open your workbook in WPS Spreadsheets and identify the lookup cell, search range, and return range. This example uses G10, I10:I12, and J10:J12.
- 2. Create a helper formula: In an unused cell such as K10, enter =ISNUMBER(SEARCH($G$10,I10)) and press Enter.
- 3. Fill the helper column: Drag the fill handle from K10 down to K12 so each row in the search range is checked.
- 4. Return the adjacent value: In an empty result cell, enter =INDEX(J10:J12,MATCH(TRUE,K10:K12,0)) and press Enter.

Frequently Asked Questions
Does SEARCH distinguish between uppercase and lowercase text?
No. SEARCH is case-insensitive. To make the lookup case-sensitive, replace SEARCH with FIND in the formula.
What happens if more than one cell contains the lookup text?
MATCH returns the position of the first matching cell in the search range, so INDEX returns the adjacent value from that row.
Why does the formula return #N/A?
The formula returns #N/A when no cell in the search range contains the lookup text. Check G10 and the search range, or wrap the formula in IFERROR to display a custom message.
Can the formula distinguish a complete item from part of a word?
Not as written. SEARCH matches substrings, so a short lookup value can match a longer item. For whole-item matching, normalize commas and slashes and compare the separated items.




