Home > Back-end >  How do I count all instances of a phrase to the left of the current cell in Google Sheets?
How do I count all instances of a phrase to the left of the current cell in Google Sheets?

Time:05-29

So I want to use a formula to count every time a phrase to the left of a cell is used in a specific column, but it doesn't seem to be working.

The formula I'm trying right now is this:

=countif(AE1:AE, "=INDIRECT(ADDRESS(ROW(),COLUMN()-1))")

I'm guessing the problem is that it thinks the formula is the text I'm looking for, not that it's an actual formula, but I'm not sure how to fix that, or of it's even possible to fix?

Would prefer a solution I can easily copy paste into multiple cells n not have to modify a whole lot.

EDIT: Here's an example:

enter image description here


or like this:

=ARRAYFORMULA(IF((A1:A="") REGEXMATCH(A1:A, "dog|pig|cat"),,COUNTIF(A1:A, A1:A)))

enter image description here

  • Related