简体   繁体   English

Excel countif-

[英]Excel countif -

Excel countif - I need to count a list of policies that are within a date range (expired policies) and include specific transaction types. Excel countif-我需要计算日期范围内的策略列表(过期的策略),其中包括特定的交易类型。

Originally, I needed to do the countif based on excluding values. 最初,我需要根据排除值进行计数。 Now as the transaction types have grown, it would be more efficient to just include the values I want. 现在,随着事务类型的增长,仅包含我想要的值将更加有效。 Below was the formula based on excluding certain values. 以下是基于排除某些值的公式。

=COUNTIFS(A1:A4,"<"&DATE(2018,1,15),B1:B4,"<>"&"Can",B1:B4,"<>"&"END") allows me to exclude values I don't want recorded. = COUNTIFS(A1:A4,“ <”&DATE(2018,1,15),B1:B4,“ <>”&“ Can”,B1:B4,“ <>”&“ END”)允许我排除值我不想录音。

Policies are defined by transaction type: New,Ren,End,Can, REN-1,REN-2 etc... 策略由交易类型定义:New,Ren,End,Can,REN-1,REN-2等。

I only want to count New and Ren within the date formula above however when I edit the above formula to =COUNTIFS(A1:A4,"<"&DATE(2018,1,15),B1:B4,"New",B1:B4,"REN") I just get a 0 value Thanks for reading 我只想在上面的日期公式中计算New和Ren,但是当我将上面的公式编辑为= COUNTIFS(A1:A4,“ <”&DATE(2018,1,15),B1:B4,“ New”,B1时: B4,“ REN”)我得到一个0的值,谢谢阅读

I will go out on a limb and assume your question is "What's wrong with my formula?". 我会弯腰,假设您的问题是“我的配方怎么了?”。

Try: 尝试:

=COUNTIF(C6:C978,"<"&DATE(2018,10,31))

Edit: For multiple criteria you must use COUNTIFS : 编辑:对于多个条件,您必须使用COUNTIFS

=COUNTIFS(A1:A4,"<"&DATE(2018,1,15),B1:B4,"<>"&"Can",B1:B4,"<>"&"END")

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

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