Search text in a string and return adjacent cell of first value found

glynn1969

Board Regular
Joined
Nov 24, 2018
Messages
88
Office Version
  1. 365
Platform
  1. Windows
Hello

I have a list in column A which will contain lots of various text entries (from A3 to A700) - within these cells there will be staff names, anywhere in column A and the same name could appear 1 or more times and amongst various other text

In column B will be a return to state their location (if a staff name does appear more than once they will always be against the same value in column B).

In cell C3 i will enter a staff name - my wish is to be able to place a formulae in cell D3 that will look through column A, find the first value of the name in cell C3 and return the location.

Column A Column B Cell C3 Cell D3
En John Smith 324334 Economics Paul Jones (need formulae to return "English")
Fr Paul Jones 324246 English
John Smith TE 8564645 Economics
GT John Smith 845754 Economics
HG Sandra Frey 671182 Accounts
KJ Paul Jones 85662 English

Any help would be much appreciated.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Please post your example with XL2BB so that the formatting is preserved and we can see what belongs where.
 
Upvote 0
How about
=INDEX(B$2:B$20,MATCH("*"&C3&"*",A$2:A$20,0))
 
Upvote 0
Is this what you want?

Book1
ABCDE
1DataLocationNameLocation
2En John Smith 324334EconomicsPaul JonesEnglish
3Fr Paul Jones 324246English
4John Smith TE 8564645Economics
5GT John Smith 845754Economics
6HG Sandra Frey 671182Accounts
7KJ Paul Jones 85662English
8
Sheet37
Cell Formulas
RangeFormula
E2E2=LOOKUP(2,1/SEARCH(D2,A2:A10),B2:B10)
 
Upvote 0
Glad we could help & thanks for the feedback.

In future, please do not type you reply inside a quote, it makes look as though you have simply quoted somebody without a response.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top