Finding a cell in a range containing the required fragment

Ramzay

New Member
Joined
Apr 21, 2017
Messages
3
I get a row of cells containing some text. Let's say they are names.

Mary Jane WhiteJohn Robert BlackSusan Lou BrownRoger GreenAlice Ann Grey Peter Red

<tbody>
</tbody>




With an Excel formula I need to get the whole content of the cell that contain a given word. For example, if I get "Ann", I should be able to return "Alice Ann Grey".

Any suggestions would be greatly appreciated. Thank you.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Here is another way
Enter formula in B5 and copy down

=IF(A5="","",LOOKUP(1,-FIND($A5,A$1:F$1),A$1))


Book1
ABCDEF
1Mary Jane WhiteJohn Robert BlackSusan Lou BrownRoger GreenAlice Ann GreyPeter Red
2
3
4
5AnnAlice Ann Grey
6BlackJohn Robert Black
7GreeRoger Green
8SusSusan Lou Brown
9RedPeter Red
Sheet5
 
Upvote 0

Forum statistics

Threads
1,213,526
Messages
6,114,136
Members
448,551
Latest member
Sienna de Souza

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