COUNTIF any part of cell string appears in range

shella

New Member
Joined
Jan 15, 2014
Messages
34
Hello! I'm having issues getting the correct formula to search a range and COUNTIF any part of a cell's text appears anywhere in the range.

Using A as the search criteria and C as the range, I would expect the column B results below, but, in B2/B3 it's returning 0 no matter what formula I try. Any suggestions from you smart folks is very much appreciated!

Thank you very much!

A
ABC
1Mango2Steak
2Orange/Clementine/Mandarin3Pear
3Peach/Nectarine/Apricot2Orange
4Pear2Honeydew
Apricot
Nectarine
Watercress
Orange
Mango
Pear
Clementine
Mango

<tbody>
</tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try this:


Book1
ABC
1FruitCountList
2Mango2Steak
3Orange/Clementine/Mandarin3Pear
4Peach/Nectarine/Apricot2Orange
5Pear2Honeydew
6Apricot
7Nectarine
8Watercress
9Orange
10Mango
11Pear
12Clementine
13Mango
Name1
Cell Formulas
RangeFormula
B2=SUMPRODUCT(COUNTIF(A2,"*"&$C$2:$C$13&"*"))
 
Upvote 0
SOLVED: COUNTIF any part of cell string appears in range

Eric,

Thanks so much - that completely worked for the dummy data that I created but didn't give the intended result when I plugged into my actual spreadsheet because my actual range contains blank cells. HOWEVER, the "wrong result" shed enough light for me to realize I just needed to subtract the blank cells in my formula and it now works beautifully.

Thanks very much!!!

Best,
Shella
 
Upvote 0
Re: SOLVED: COUNTIF any part of cell string appears in range

Glad you got it figured out! :cool:
 
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,270
Members
449,093
Latest member
Vincent Khandagale

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