简体   繁体   English

我在这里需要什么Excel公式?

[英]What Excel formula do I need here?

I have a spreadsheet working on that has a list of activities that occurred between January and December and each activity occurred multiple times during January thru December ie: June there were 12 different entries that occurred with one activity occurring multiple times 我有一个工作表,其中包含一月到十二月之间发生的活动的列表,每个活动在一月到十二月之间发生了多次,即:6月发生了12种不同的条目,其中一项活动发生了多次

What I need is to count the number of occurrences of a certain activity but only those occurring in June. 我需要计算的是某项活动的发生次数,但仅统计六月中发生的次数。 I have tried the count function, the sum function, the countif function, the sumif function, and the if function - nothing is working! 我试过了count函数, sum函数, countif函数, sumif函数和if函数-没什么用!

Also I am using 2010 Excel, here is example of my tried equations =countif(a3:a16,a73,c4,a3:a165) . 我也在使用2010 Excel,这是我尝试过的方程式的示例=countif(a3:a16,a73,c4,a3:a165) The range a3:a165 is data range a73 is date c4 is activity. 范围a3:a165是数据范围a73是日期c4是活动。 I am just drawing a blank and have researched it but nothing seems to fit and I haven't used Excel in this form since high school. 我只是在绘制一个空白并进行了研究,但是似乎没有什么合适的选择,并且自高中以来就没有以这种形式使用Excel。

Column a is month column c is activity column b is persons name 列a是月份列c是活动列b是人员姓名

have you tried COUNTIFS it is same as COUNTIF but it takes multiple conditions. 您是否尝试过COUNTIFSCOUNTIF相同,但是需要多个条件。

Since you didn't specify all relevant ranges I'll assume that A3:a165 has the dates, and B3:B165 has activity names 由于您未指定所有相关范围,因此我假设A3:a165具有日期,而B3:B165具有活动名称

=COUNTIFS(MONTH(A3:A165),Month(a73),B3:B165,C4)

So you were almost there. 所以你快到了。 However if this doesn't work for you consider adding column C if possible where you would use following formula(ex. of C3) =MONTH(A3) and your countif formula would would look like this 但是,如果这对您不起作用,请考虑在可能的情况下使用以下公式(例如C3) =MONTH(A3)添加C列,而您的countif公式将如下所示

=COUNTIFS(A3:A165,MONTH(A73),B3:B165,C4)

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

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