formula to check if cel contains text from column

Donckmeister

New Member
Joined
May 26, 2015
Messages
8
Hi,

I'm looking for a formula to check if a cell contain text from a colomn.
Can't seem to find it in excel 2013. Any help would be greatly appreciated! Example:

ABC
1chicago broken pipeschicagotrue
2plumbernew yorkfalse
3plumbers new yorkdallastrue
4remodeling dallashoustontrue
5frozen pipessan josefalse
6plumbing services houstonjacksonvilletrue
7plumbing servicescolumbusfalse
8frozen pipes denverdetroitfalse
seattle

<tbody>
</tbody>

Many thanks!

Regards,

Donckmeister
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi All,

a possible approach: in B1:B8 substrings to be recognized in A1


=ISNUMBER(MATCH(1,INDEX(SEARCH("*"&$B$1:$B$8&"*",A1),),0))

Hope it helps
 
Upvote 0
Hi guys,

I'm using the formula =ISNUMBER(MATCH(1,INDEX(SEARCH("*"&$B$1:$B$8&"*",A1),),0)) for some while now.
It does generate false positives. For example: "model" in colomn B would match "
remodeling dallas". I only want to exactly match to the specific words not if they are part of a word.

Any ideas?

Many thanks!
 
Upvote 0
Does this make any difference?

=ISNUMBER(MATCH(1,INDEX(SEARCH("* "&$B$1:$B$8&" *",A1),),0)) - notice the spaces - untested.
 
Upvote 0
Hi Ali,

Thanks for replying.

It does if the word is in the middle of a sentence.
If it's at the beginning or end then it doesn't match correctly.
 
Upvote 0

Forum statistics

Threads
1,203,116
Messages
6,053,603
Members
444,673
Latest member
DWriter9

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