Need to count number of occurrences of a word in a column

jase

Board Regular
Joined
Nov 4, 2002
Messages
62
Column A has 100 entries (A2 through A101)
Some of these entries are "Houston"

What formula can I use to calc. how many times the word "Houston" appears within that Column so that I don't have to manually count each time???

Thanks for any help.
jase.
 
Figured it out using your Aladin's post along with posts on the first page. Basically
=SUMSIFS(c1:c5,B1:b5,"*"&"Dog"&"*")

So it only works with the proper capitalization, but that's okay for my use.

Thanks Aladin!
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Sorry, my formatting is bad, there was intended to be two distinct columns, column A with red dog...green dog, and column B with the numbers. My formatting is crap

So the data is in A:B...

Thanks, I played with that command but only works with exact matches. with the columns having 'red dog', 'blue dog', etc., this doesn't work. Any other ideas?
Thanks again.

Given A:B...

=SUMIFS(B:B,A:A,"*dog")

would also pick out a reddish dog if one is there in A.

Experiment also with...

=SUMIFS(B:B,A:A,"dog*")

and with...

=SUMIFS(B:B,"*dog*")
 
Upvote 0
I need to take the example of =COUNTIF(A1:A100,"WG") to the next level, so to speak. I have people's initials in column A. I want to count how many times WG shows up in Column A only if the cells next to it, in Column B, are not blank.

Thanks so much!

Sonya
 
Upvote 0
I need to take the example of =COUNTIF(A1:A100,"WG") to the next level, so to speak. I have people's initials in column A. I want to count how many times WG shows up in Column A only if the cells next to it, in Column B, are not blank.
Give this formula a try...

=SUMPRODUCT(--(A1:A100="WG"),--(B1:B100<>""))
 
Upvote 0
I need to take the example of =COUNTIF(A1:A100,"WG") to the next level, so to speak. I have people's initials in column A. I want to count how many times WG shows up in Column A only if the cells next to it, in Column B, are not blank.

Thanks so much!

Sonya

Would this work for you?

=COUNTIFS(A1:A100,"WG",B1:B100,"<>")

You might even have:

=COUNTIFS(A:A,"WG",B:B,"<>")

If B is supposed to be text:

=COUNTIFS(A:A,"WG",B:B,"?*") <strike>
</strike>
 
Upvote 0
Give this formula a try...

=SUMPRODUCT(--(A1:A100="WG"),--(B1:B100<>""))

Thank you, Rick! Worked like a charm. Now, I need a refinement. In column P, I've got days, such as 3/1, 3/2, etc. I'd like to use this now formula to show me how many times 'WG' shows up according to the days in column P.

Many thanks, again!
 
Upvote 0
Thank you, Rick! Worked like a charm. Now, I need a refinement. In column P, I've got days, such as 3/1, 3/2, etc. I'd like to use this now formula to show me how many times 'WG' shows up according to the days in column P.

Many thanks, again!

So you don't have COUNTIFS?
 
Upvote 0
Thank you, Rick! Worked like a charm.
You are welcome. Just wondering if you saw the formula Aladin posted in Message #27 (COUNTIFS, if your version of Excel has it, is probably more efficient than SUMPRODUCT)?


I'd like to use this now formula to show me how many times 'WG' shows up according to the days in column P.
I am not completely sure what you are asking for here. Can you give a more detailed description of what you are looking for?
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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