Counting the number of times a string appears within a range of values

alon

Board Regular
Joined
Apr 12, 2011
Messages
58
Hello all,

Before I start describing my problem, I have uploaded a screenshot of my worksheet to tinypic.com. You can see it here:

http://oi51.tinypic.com/2j34ca9.jpg

and also, here's the worksheet itself:
http://gopile.us/hlc

What I'm trying to calculate is in how many of the values - the cells - in column A "username", the string in D2 appears. I'm not looking for an exact match, so if D2 = "martin", than any cell in column A that has "martin" in it, such as "xxxmartinyyy", would count.

In the sheet and the screenshot I describe what I tried to do.
In column C I calculated for each row if the term in D2 appears in the cell in column A. Hence, I know that there's a total of 14 values. However, I'm not interested in doing this in such a complicated and long way,
and this is why I turn to you.

Please help.

Thank you!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Yes, it works. So simple! Can you perhaps explain why the formula I used doesn't work? It holds until the "countif" argument. Thanks again :)
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,239
Members
452,898
Latest member
Capolavoro009

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