Google Sheets count how many cells contain a specific word / words?

Ryflex picture Ryflex · Nov 6, 2016 · Viewed 15.3k times · Source

I'm trying to look at all cells in a set of columns/cells to count how many of them contain the word WORDHERE (in this example)

I've tried using:

=SUM(COUNTIF(A1:A100, "WORDHERE"))

However this finds 0 as the cell contains other words/letters/numbers, if the cell only contains WORDHERE it works perfectly.

I've tried using several regeexxtract and regexmatch including the actual word as you can see below:

=SUM(COUNTIF(A1:A100,REGEXEXTRACT(A1:A100, "WORDHERE")))

But again, it finds 0 matches.

What am I doing wrong?

Answer

Jeremy Kahan picture Jeremy Kahan · Nov 6, 2016

Not exactly answering what you are doing wrong, but here is what you can do:

=COUNTIF(A1:A100, "*WORDHERE*")