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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top