Forum Discussion
ASCMV
Oct 15, 2020Copper Contributor
Counting occurrences of various occurrences in the same row
I have a spreadsheet with multiple columns and rows of animal intake data for an animal shelter. I'd like to be able to count how many times there is a row that contains a cell with specific text AN...
ASCMV
Oct 15, 2020Copper Contributor
SergeiBaklan Thank you! I think I got it with:
=SUM(IF((firstColumn="word1")*AND(secondColumn="word2"),1,0))
My issue now is that the data I'm analyzing sometimes includes additional text in the same cell. So it contains the text I'm looking for, but also something else, and so it's not an exact match with the what's in the formula. I'm guessing there is no way around that.
Thanks again.
SergeiBaklan
Oct 15, 2020Diamond Contributor
That could be
=SUMPRODUCT(
ISNUMBER(SEARCH("word1",firstColumn))*
ISNUMBER(SEARCH("word2",secondColumn))
)