I need to tally the number of times a term appears. Unfortunately, the terms were not well organized so a term may appear in more than one column - so I can\'t use just
Seems a case for COUNTIF. Say your data is in A1:H1:
=COUNTIF(A1:H1,"HEALTH")
Depending on how you want to count your input cells, and assuming your input data is in A1:F1
, you may want (1)
=COUNTIF(A1:F1,"HEALTH")
as posted by pnuts, or (2)
=COUNTIF(A1:F1,"*HEALTH*")
This version also counts cells which contain HEALTH
with other characters as well.
An alternative for formula (1) is
=SUM(IF(A1:F1="HEALTH",1,0))
entered as an array formula with Ctrl+Shift+Enter. Similarly for formula (2).
There are other more complex cases you may want to consider: a) cells containing HEALTH
more than once, b) HEALTH
only as whole word, etc.