Is it possible to identify one of many strings of text in a given cell

Hollywoood

Board Regular
Joined
Aug 11, 2011
Messages
53
Hi all,

I recent received some help in writing a formula to identify a given string in a cell containing many strings. The result is below.

=COUNTIF('Sheet'!M:M,"*"&A2&"*")

I have been trying to expand on this but to no positive result. My goal is to be able to look through the same column, containing the multiple strings, and return either a true/false or a count of the occurences if, any of several separate strings exist in that cell.

I tried the very simple expansion to (which I realize is way wrong)

=COUNTIF('Sheet'!M:M,"*"&A2:A15&"*")

would i need to use a nested OR in the countif such as

=COUNTIF('Sheet'!M:M,OR("*"&A2&"*","*"&A3&"*",.....) ?? This doesnt seem to produce the correct result either

I am becoming increasingly owing to you folks lol.. as always thanks in advance
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try this..

=SUMPRODUCT(COUNTIF('Sheet'!M1:M100,"*"&A2:A15&"*"))

I recommend NOT using the entire column refs like M:M, so I changed it to M1:M100


Hope that helps.
 
Last edited:
Upvote 0
For instance, this works for me:

=SUM(COUNTIF(A1:H18,"*"&M1:M2&"*"))

Note that I changed the cell references.

Confirm the formula with Ctrl-Shift-Enter instead of Enter.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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