Countifs语句中的多个条件范围

时间:2019-04-03 11:52:49

标签: excel

我有一些条件范围(C3:C9,I4:I9,O4:O9),我想在我的countifs语句中使用它。按预期自行完成一个范围。但是,一旦我在countif语句中添加多个范围,它就会返回NULL值。

由于电子表格的布局,这些值是相同的,只是分为3个范围​​。

Screeshot of the excel spreadsheat

电子表格应该可以帮助我查看团队午餐时间。而且我有一个工作模型。只需要帮助使用Countif中的多个数据范围

尝试使用单个数据集-可以正常工作

将所有集合尝试为单数。它们也按预期工作。

=COUNTIFS($C4:C$9, "<=" & A12,$E4:$E9,">" & A12) Works Single Criteria Range)  

Works单一条件范围)

=COUNTIFS($C4:C$9 $I$4:$I$8 $O$4:$O$9, "<=" & A12,$E4:$E9,">" & A12) 

NULL值不起作用。

期望的输出将是所有数据范围都被接受并且不返回空值。

1 个答案:

答案 0 :(得分:0)

您可能要考虑使用void add_to_cart(int se_id,int c_id,char p_name[]) { char id_seller[100],id_customer[100],id_seller1[100],id_customer1[100]; itoa(se_id,id_seller,10); itoa(se_id,id_seller1,10); itoa(c_id,id_customer,10); itoa(c_id,id_customer1,10); strcat(id_seller,"pd.txt"); strcat(id_seller1,"pr.txt"); strcat(id_customer,"itm.txt"); strcat(id_customer1,"pzr.txt"); char location_of_cart_product[]="C:\\TURBOC3\\BIN\\BANK\\SHOP\\CART\\",location_of_cart_price[100]; char location_of_product[]="C:\\TURBOC3\\BIN\\BANK\\SHOP\\SELLER\\",lop[100]; strcpy(location_of_cart_price,location_of_cart_product); strcpy(lop,location_of_product); strcat(location_of_cart_product,id_customer); strcat(location_of_cart_price,id_customer1); strcat(lop,id_seller1); strcat(location_of_product,id_seller); puts(location_of_product); puts(lop); puts(location_of_cart_product); puts(location_of_cart_price); } ,下面是一个示例:

enter image description here

我使用的公式翻译为:

SUMPRODUCT()

您显然可以扩大公式的范围。在您的情况下,它看起来像:

=SUMPRODUCT(((A1:A11<=A12)*(A1:A11<>"")*(C1:C11>A12))+((D1:D11<=A12)*(D1:D11<>"")*(F1:F11>A12)))
相关问题