Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top