简体   繁体   English

Excel:countIFS特定于星期几和其他条件

[英]Excel: countIFS specific day of the week and additional criteria

I was wondering what would be a formula if I want to count based on various criteria, but specifically(because I think this is what I'm having trouble) if one of those criteria should be if a date of a column equals certain day of the week (ie 2/2/2016 = thursday) 我想知道如果要基于各种条件进行计数将是一个公式,但是具体来说(因为我认为这是我遇到的麻烦),如果这些条件之一应该是如果某列的日期等于某天的某天一周(即2/2/2016 =星期四)

So basically I want to count how many orders were made on a THURSDAY with the code FTN and with any status except ABANDONED (see image attachments) 所以基本上我想计算一个星期四用代码FTN和除ABANDONED之外的任何状态下的订单数量(请参阅图像附件)

Here is the formula I used which gave me 0 when the answer should be 5: 这是我使用的公式,当答案应为5时给了我0:

=COUNTIFS(A2:A15,WEEKDAY(A2:A15)=5,C2:C15,"FTN",D2:D15,"<>*ABANDONED*")

Data 数据

Dates to day of week 日期到星期几

COUNTIFS() is picky on how the criteria is done, you will not be able to do it this way. COUNTIFS()对如何完成条件很挑剔,您将无法采用这种方式。 You will need to use an array type formula. 您将需要使用数组类型公式。

You can use SUMPRODUCT(): 您可以使用SUMPRODUCT():

=SUMPRODUCT((WEEKDAY(A2:A15)=5)*(C2:C15="FTN")*(ISNUMBER(SEARCH("ABANDONED",D2:D15))))

This will count where all three are True. 这将计算所有三个为真的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM