Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试计算范围与单元格不匹配的次数。
例如:B5 可以是“是”或“否”,这取决于从数据验证表中的选择。我希望公式计算 C5:N5 与 B5 不匹配的次数。因此,如果 B5 为“是”,则在 C5:N5 中选择了多少次“否”。如果 B5 为“否”,则在 C5:N5 中选择了多少次“是”。
您应该使用以下COUNTIF功能:
COUNTIF
=COUNTIF(C5:N5,"<>" & B5)
此函数将返回C5:N5不等于 cell 值的单元格数B5。
C5:N5
B5