Google电子表格:过滤以获取匹配模式块

时间:2015-12-07 08:58:38

标签: excel google-sheets

我有一部分日常运行数据如下:

15/09/2015 00:00:00 STOP    
15/09/2015 00:15:00 START   
15/09/2015 00:30:00 START   
15/09/2015 00:45:00 START   
15/09/2015 01:00:00 START   
15/09/2015 01:15:00 START   
15/09/2015 01:30:00 START   
15/09/2015 01:45:00 START   
15/09/2015 02:00:00 START   
15/09/2015 02:15:00 STOP    
15/09/2015 02:30:00 STOP    
15/09/2015 02:45:00 START   
15/09/2015 03:00:00 START   
15/09/2015 03:15:00 START   
15/09/2015 03:30:00 START   
15/09/2015 03:45:00 START   
15/09/2015 04:00:00 START   
15/09/2015 04:15:00 START   
15/09/2015 04:30:00 STOP

循环将在STOP模式之间定义,因此 cycle_one需要1小时45分钟,如下所示。

我现在一直在做的是使用IF函数我可以得到时间差,然后我使用SUM函数的最后一列。然后我手动将每个块模式识别为cycle1,cycle2 ..

15/09/2015 00:00:00 STOP    00:00:00    0
15/09/2015 00:15:00 START   00:00:00    00:00:00
15/09/2015 00:30:00 START   00:15:00    00:15:00
15/09/2015 00:45:00 START   00:15:00    00:30:00
15/09/2015 01:00:00 START   00:15:00    00:45:00
15/09/2015 01:15:00 START   00:15:00    01:00:00
15/09/2015 01:30:00 START   00:15:00    01:15:00
15/09/2015 01:45:00 START   00:15:00    01:30:00
15/09/2015 02:00:00 START   00:15:00    01:45:00
15/09/2015 02:15:00 STOP    00:00:00    0
15/09/2015 02:30:00 STOP    00:00:00    0
15/09/2015 02:45:00 START   00:00:00    00:00:00
15/09/2015 03:00:00 START   00:15:00    00:15:00
15/09/2015 03:15:00 START   00:15:00    00:30:00
15/09/2015 03:30:00 START   00:15:00    00:45:00
15/09/2015 03:45:00 START   00:15:00    01:00:00
15/09/2015 04:00:00 START   00:15:00    01:15:00
15/09/2015 04:15:00 START   00:15:00    01:30:00
15/09/2015 04:30:00 STOP    00:00:00    0

是否有可能在STOP模式之间实际过滤数据,以便更容易求和并按块定义循环?

1 个答案:

答案 0 :(得分:0)

我已经设置了一个示例表,其中包含用于标识块的建议公式(单元格F2)和用于汇​​总数据的查询(单元格H1):https://goo.gl/sLbuUT