Function Problems

Excel Formula to Find Text and Return a Name from the Same Row

Amos GikundaAmos Gikunda Dec 2, 2026 868 views

Question details

Find text contained in a roster cell and return the name from another column on the same row.

Find Text and Return a Name from the Same Row in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user has search text in C11, searchable roster values in D2:D7, and corresponding names in E2:E7.
Observed behavior
The desired result is the name from the first row whose searchable value contains the text in C11.
Before you start

Confirm that the searchable values and names occupy corresponding rows, and enter the text to find in C11. The examples below use D2:D7 for the search and E2:E7 for the names; adjust both ranges together for your roster.

Solution 1Recommended

Use XLOOKUP to find text and return the matching name

Use this formula in an Excel version that supports XLOOKUP to return the first name matching a partial text search.

1
Enter the search text

Type the text you want to find into cell C11.

2
Add the lookup formula

Select an empty result cell and enter =IF(C11="","",XLOOKUP("*"&C11&"*",D2:D7,E2:E7,"",2)).

3
Check the result

Press Enter. The formula returns the name from the first matching row, or a blank if C11 is empty or no match is found.

Use XLOOKUP to find text and return the matching name
How wildcard matching works: The asterisks match text before or after the search term. Matching is case-insensitive, and XLOOKUP returns the first match. An asterisk or question mark entered in C11 is also treated as a wildcard.
Find roster matches in WPS

Find a matching name in WPS Spreadsheets

Use INDEX and MATCH with wildcards in WPS Spreadsheets to find text within a roster cell and return the name from the same row.

  1. 1. Open the roster: Open WPS Spreadsheets and use Open to select your roster workbook.
  2. 2. Enter the search term: Type the text to find in cell C11, with searchable values in D2:D7 and corresponding names in E2:E7.
  3. 3. Insert the formula: Select an empty result cell and enter =IF(C11="","",IFERROR(INDEX(E2:E7,MATCH("*"&C11&"*",D2:D7,0)),"")).
  4. 4. View the result: Press Enter to return the name from the first matching row. Adjust the ranges in the formula if your roster uses different cells.
Find partial text matches and return the corresponding nameOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and a straightforward interfaceWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

How do I find text that is only part of a cell?

Surround the search value with asterisks, as in "*"&C11&"*". In XLOOKUP, set the match mode to 2 to enable wildcard matching.

What happens if more than one roster row matches?

The formulas shown return the name from the first matching row in the search range.

Why does the formula return a blank?

The formulas return a blank when C11 is empty or when no matching text is found. Check C11 and confirm that D2:D7 contains the values you want to search.

Can I use VLOOKUP instead?

Yes. When the search column is to the left of the name column, enter =IF(C11="","",IFERROR(VLOOKUP("*"&C11&"*",D2:E7,2,FALSE),"")) in an empty cell.