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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,215,108
Messages
6,123,133
Members
449,098
Latest member
Doanvanhieu

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