简体   繁体   English

使用条件计算单元格公式:日期和字符串以及空单元格

[英]Counting Cells Formula with Criteria: Date & String & Empty Cells

I'm trying to do a whole lot of counting using a table (growing) with over 4,000 entries by date. 我正在尝试使用一个具有越来越多的按日期排列的表(不断增长)进行计数。 The table in the picture below is the one I am trying to fill in. I Have a few simple criteria, but I'm not sure how to do this in a formula within a cell that I can copy across this giant table. 下图中的表格是我要填写的表格。我有一些简单的标准,但是我不确定如何在可以跨此巨型表格复制的单元格中的公式中执行此操作。 I've tried multiple CountIf and CountIfs with no luck. 我已经尝试了多个CountIf和CountIfs,但是没有运气。

The criteria are as follows: I want to count the number of times a tool occurs (column E) in a particular date (Column A). 标准如下:我想计算工具在特定日期(列A)出现的次数(E列)。 Only counting when Column W is not empty. 仅在W列不为空时计数。 Then I want to copy that through this entire table checking every tool by every date. 然后,我想通过整个表复制该文件,并在每个日期检查每个工具。

在此处输入图片说明

The data is coming from this table: 数据来自此表:

在此处输入图片说明 在此处输入图片说明

COUNTIFS(), With your date lookups including a time portion we need to bracket the days. COUNTIFS(),在您的日期查询中包括时间部分的情况下,我们需要将日期括起来。

=COUNTIFS('Sheet1'!$A:$A,">=" & INT($C3),'Sheet1'!$A:$A,"<" & INT($C3)+1,'Sheet1'!$E:$E,D$1,'Sheet1'!$W:$W,"<>")

Change Sheet1 to the sheet name in which the data is located. 将Sheet1更改为数据所在的工作表名称。

Put this in D2 and copy over and down the grid. 将其放在D2中并在网格上方和下方复制。

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

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