我在试着从两列中获取匹配的数量。假设我有一个包含以下数据的表。
汽车
In column A I have colours of cars e.g. Red, Yellow, Black, Green
In column B I have the type of car e.g. Diesel, Automatic, Manual我想要所有在柴油上运行的红卡的计数,那么我应该使用哪个函数?
Column A has 3 red cars
Column B has 6 diesel cars in total but only 1 of the red cars is a diesel.我试过了:
=COUNTIF(A2:A10,"Red")+COUNTIF(B2:B10,"Diesel")但它给出了所有红色汽车和所有柴油车的总和(9),而不是所有红色柴油车,这应该是1。
发布于 2014-09-22 02:29:53
您可以使用=COUNTIFS()公式:
=COUNTIFS(A1:A10,"Red",B1:B10,"Diesel")发布于 2014-09-22 00:17:54
你需要对每一行做一个运算,然后求出全部的和。

https://stackoverflow.com/questions/25961005
复制相似问题