• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Count # times a word appears in column of text strings?

Hi,


I have a column that contains text strings and I want to count the number of times any cell in this column has a specific word in its text string...so say my column has values like:

[pre]
Code:
Meals-Breakfast
Parking
Meals-Lunch
Lodging
Taxi
Meals-Snack
Meals-Lunch
Airfare
Meals-Dinner
Meals-Snack
[/pre]
I want to be able to count the number of instances that a cell in this range contains the word "Meals", regardless of if it was breakfast or lunch, etc. So this example would yield 6 counts.


I have been trying to use COUNTIFS but have had no luck!


Thanks for the help!
 
Hi, Jeffrey Lebowski!

I remember having seen this question recently. Have you tried using the search built-in feature at top right of this window?

Regards!
 
Hi Jeff ,


COUNTIFS needs to be used only if you have more than one criterion ; in your case , you have only one , which means you can use COUNTIF :


=COUNTIF(List_of_words,"*"&"Meals"&"*")


If you are sure that the word Meals will not occur anywhere in the middle of the text within a cell , then you can omit the left-most asterisk , and use :


=COUNTIF(List_of_words,"Meals"&"*")


Narayan
 
Back
Top