Search one cell for specified words

Shoey68

New Member
Joined
Nov 21, 2010
Messages
15
Hi there,
I'm trying to count if 1, 2 or all 3 of a selection of words appear in certain cells.
For instance. Three cells might contain:
A1 "The cat sat on the mat"
A2 "The dog chased the ball"
A3 "Then the dog sat on the mat"

I need a formula to identify whether or not each cell contains the words "cat", "sat" or "mat", but not count the occurences.
The result should be like:
B1 "1" (all three words appear, but I need Excel to count only 1 occurence)
B2 "0" (none of the words appear)
B3 "1" (2 words appear, but agian I need Excel to count only once"

Apologies if I haven't explained this very well and thanks in advance for your help!!
 
Here you go...I didn't realize the formula I posted would be an array-formula.
This one is a regular formula:
Code:
B1: =--OR(INDEX(ISNUMBER(SEARCH(" "&D$1:D$3&" "," "&A1&" ")),0))
That should work....Does it?
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
That's superb!!

Worked a treat

Thanks for all your help!!!

That's a nice, concise formula (per usual from Mr. Valko).

This may not be an issue, but...Just be aware that it doesn't differentiate between standalone words and embedded words.
In this example, it would think that "cat" is a match:
"The catcher in the rye"
 
Upvote 0

Forum statistics

Threads
1,225,155
Messages
6,183,212
Members
453,151
Latest member
Lizamaison

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