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.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Thanks Marcel, that's perfect! Thanks

Interesting idea Aladin, but it will fail to pick up words followed by comma's and other punctuation and for this it's easier to minus the count of withouts from the withs... (as it is I'm picking out certain words and I'm happy for Repair to find repairs and repaired...)

Thanks for the help both.

If so, why don't you try...

=SUMPRODUCT(LEN(A1:F100)-LEN(SUBSTITUTE(UPPER(A1:F100),"WITH","")))/LEN("with")

which is faster?
 
Upvote 0
I wasn't going to make the changes you suggested, because the answer from Marcel was working well enough, but I had to change something else so figured I'd do it and it's noticeably faster. Cheers.
 
Upvote 0
I wasn't going to make the changes you suggested, because the answer from Marcel was working well enough, but I had to change something else so figured I'd do it and it's noticeably faster. Cheers.

I'm sure Marcel won't mind. Thanks for the update.
 
Upvote 0
Thanks Marcel, that's perfect! Thanks

Interesting idea Aladin, but it will fail to pick up words followed by comma's and other punctuation and for this it's easier to minus the count of withouts from the withs... (as it is I'm picking out certain words and I'm happy for Repair to find repairs and repaired...)

Thanks for the help both.

The formula in post #8 counts 2 for "with or without". Is this what you need?
 
Last edited:
Upvote 0
The tips posted work, but I need to complicate the question. Is there a formula that will count the occurrence of a value in a column based on the value of another column?

For example, consider this data
red dog 1
red cat 0
blue dog 0
red cat 1
green dog 3

I need a formula that would search for "dog", then if found sum the value in the second column. In the example, if searching for "dog", I would get 4 (1+0+3).
Any ideas? Thanks!
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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