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 AND a second cell within that same row with other specific text.
Example: I'd like to count how many times a specific intake type (Stray) came from a specific jurisdiction (The City).
I hope that makes some sense.
Thank you.
3 Replies
Sort By
- ASCMVCopper 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.That could be
=SUMPRODUCT( ISNUMBER(SEARCH("word1",firstColumn))* ISNUMBER(SEARCH("word2",secondColumn)) )