I need a function in Google Sheets similar to SUMIF
which counts non numeric values (text), which separates criteria from counted range.
In column 2 below, I need to count all words with their respective activity ID (column 1).
So something like COUNTIF($A2:$A, 1, $B2:$B)
. Unfortunately, COUNTIF
doesn't take a third parameter.
So below, COUNTIF
for activity 1
would be 3 since there are three value cells with activity 1
. For activity 2
, it would be 2.
NOTE: I've tried something like =IF($A2:$A=1, COUNTA($B2:$B),"")
, but this just counts all text values in range regardless of criteria of adjacent cell.