문제

I have a column with various text inputs. I'd like to count the number of cells that include either "word1" or "word2". So that if a single cell contains one or more of these it counts as one.

I've managed to make a formula that I think counts all occurrences of "word1" and "word2", but I'm only after the amount of cells containing one of them (or any number of them).

What is the formula for this?

도움이 되었습니까?

해결책

You can use an array formula:

=ARRAYFORMULA(SUMPRODUCT(((ISNUMBER(SEARCH("word1",A1:A5))+ISNUMBER(SEARCH("word2",A1:A5)))>0)*1))

That formula was based on barry houdini's answer a while ago.

Just change the range as required.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top