Question

I am attempting to create a word frequency counter that will read through cells that contain more than 1 word. For instance, I have over 10,000 rows that all contain sentences and I would like to grab a count of all the cells that contain the word "unhappy." The problem is that I have an entire list of different words that I would like to search for, like:

     A        B
|  Words  | Count |
| unhappy |   1   |
| irate   |   3   | 
| angry   |   4   |

I've written the following:

=COUNTIF(A:A, "*" & "A2" & "*") 

I'm trying to reference the A2 cell and then just autofill the other counts that correspond to the other words in the list. Any ideas?

Was it helpful?

Solution

As I mentioned in comments, you should use A2 without quotes:

=COUNTIF(A:A, "*" & A2 & "*")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top