Pergunta

I am trying to count the number of times that a range does not match a cell.

For example: B5 can be "Yes" or "No" based on the selection from a Data Validation Table. I want the formula to count the number of times that C5:N5 do NOT match B5. So if B5 is "Yes", how many times in C5:N5 was "No" selected. And if B5 is "No", how many times in C5:N5 was "Yes" selected.

Foi útil?

Solução

You should use the COUNTIF function:

=COUNTIF(C5:N5,"<>" & B5)

This function will return the number of cells in C5:N5 that does not equal the value in cell B5.

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