匹配Excel中同一列中两个日期之间的所有值
Posted
技术标签:
【中文标题】匹配Excel中同一列中两个日期之间的所有值【英文标题】:Match all values between two dates within same column in Excel 【发布时间】:2021-07-03 08:16:59 【问题描述】:我想解决这个问题会更容易,但我失败了......
在下面的屏幕截图中是我的数据的虚拟示例,其中 A 列采用日期/时间格式,将时间显示为 hh:mm:ss 并且有很多值。 B 列对应于日期、分钟、小时的压力变化。
在右侧的 F 列和 G 列是我需要帮助的地方,正如您在 F 列中看到的那样,日期在列(开始/结束日期)内配对,对应于 G 列(开始/停止)。 我想从 B 列获得所有介于这些特定日期之间的测量值(例如 19.02.2021 12:10 和 19.02.2020 12:47),这意味着 37 分钟。我需要所有日期对(开始/结束日期)。
原始数据...近 500 个示例:
+--------------------+----+--+--+--+
| 19.02.2020 01:17 | 31 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:18 | 31 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:19 | 31 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:20 | 32 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:21 | 32 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:22 | 33 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:23 | 33 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:24 | 33 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:25 | 34 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:26 | 34 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:27 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:28 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:29 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:30 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:31 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:32 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:33 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:34 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:35 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:36 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:37 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:38 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:39 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:40 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:41 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:42 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:43 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:44 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:45 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:46 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:47 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:48 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:49 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:50 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:51 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:52 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:53 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:54 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:55 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:56 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:57 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:58 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 01:59 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:00 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:01 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:02 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:03 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:04 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:05 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:06 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:07 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:08 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:09 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:10 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:12 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:13 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:14 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:15 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:16 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:17 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:18 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:19 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:20 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:21 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:22 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:23 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:24 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:25 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:26 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:27 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:28 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:29 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:30 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:31 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:32 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:33 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:34 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:35 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:36 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:37 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:38 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:39 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:40 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:41 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:42 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:43 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:44 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:45 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:46 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:47 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:48 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:49 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:50 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:51 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:52 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:53 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:54 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:55 | 57 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:56 | 56 | | | |
+--------------------+----+--+--+--+
+--------------------+----+--+--+--+
| 19.02.2020 02:57 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:58 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 02:59 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:00 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:01 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:02 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:03 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:04 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:05 | 56 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:06 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:07 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:08 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:09 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:10 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:11 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:12 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:13 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:14 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:15 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:16 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:17 | 55 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:18 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:19 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:20 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:21 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:22 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:23 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:24 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:25 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:26 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:27 | 54 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:28 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:29 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:30 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:31 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:32 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:33 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:34 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:35 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:36 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:37 | 53 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:38 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:39 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:40 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:41 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:42 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:43 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:44 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:45 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:46 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:47 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:48 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:49 | 52 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:50 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:51 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:52 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:53 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:54 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:55 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:56 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:57 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:58 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 03:59 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:00 | 51 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:01 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:02 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:03 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:04 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:05 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:06 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:07 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:08 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:09 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:10 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:11 | 50 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:12 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:13 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:14 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:15 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:16 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:17 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:18 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:19 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:20 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:21 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:22 | 49 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:23 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:24 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:25 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:26 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:27 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:28 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:29 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:30 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:31 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:32 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:33 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:34 | 48 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:35 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:36 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:37 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:38 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:39 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:40 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:41 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:42 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:43 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:44 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:45 | 47 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:46 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:47 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:48 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:49 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:50 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:51 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:52 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:53 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:54 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:55 | 46 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:56 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:57 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:58 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 04:59 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:00 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:01 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:02 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:03 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:04 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:05 | 45 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:06 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:07 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:08 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:09 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:10 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:11 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:12 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:14 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:15 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:16 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:17 | 44 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:18 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:19 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:20 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:21 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:22 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:23 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:24 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:25 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:26 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:27 | 43 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:28 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:29 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:30 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:31 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:32 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:33 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:34 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:35 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:36 | 42 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:37 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:38 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:39 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:40 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:41 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:42 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:43 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:44 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:45 | 41 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:46 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:47 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:48 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:49 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:50 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:51 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:52 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:53 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:54 | 40 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:55 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:56 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:57 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:58 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 05:59 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:00 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:01 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:02 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:03 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:04 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:05 | 39 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:06 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:07 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:08 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:09 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:10 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:11 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:12 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:13 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:14 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:15 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:16 | 38 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:17 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:18 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:19 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:20 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:21 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:22 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:23 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:24 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:25 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:26 | 37 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:27 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:28 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:29 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:30 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:31 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:32 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:33 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:34 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:35 | 36 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:36 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:37 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:38 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:39 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:40 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:41 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:42 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:43 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:44 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:45 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:46 | 35 | | | |
+--------------------+----+--+--+--+
| 19.02.2020 06:47 | 35 | | | |
+--------------------+----+--+--+--+
我试过了:
=LOOKUP(2,1/($A:$A<=F2)/($A:$A>=F2),$B:$B)
这是根据 F 列中的日期对输出我想要的结果。
19.02.2020 12:10 33
19.02.2020 12:11 135
19.02.2020 12:12 199
19.02.2020 12:13 198
19.02.2020 12:14 198
19.02.2020 12:15 198
19.02.2020 12:16 198
19.02.2020 12:17 198
19.02.2020 12:18 198
19.02.2020 12:19 198
19.02.2020 12:20 198
19.02.2020 12:21 198
19.02.2020 12:22 198
19.02.2020 12:23 198
19.02.2020 12:24 198
19.02.2020 12:25 198
19.02.2020 12:26 198
19.02.2020 12:27 198
19.02.2020 12:28 198
19.02.2020 12:29 198
19.02.2020 12:30 198
19.02.2020 12:31 198
19.02.2020 12:32 198
19.02.2020 12:33 197
19.02.2020 12:34 198
19.02.2020 12:35 197
19.02.2020 12:36 197
19.02.2020 12:37 197
19.02.2020 12:38 197
19.02.2020 12:39 197
19.02.2020 12:40 197
19.02.2020 12:41 197
19.02.2020 12:42 197
19.02.2020 12:43 197
19.02.2020 12:44 197
19.02.2020 12:45 197
19.02.2020 12:46 197
19.02.2020 12:47 197
02.04.2020 11:48 87
02.04.2020 11:49 181
02.04.2020 11:50 198
02.04.2020 11:51 198
02.04.2020 11:52 198
02.04.2020 12:25 198
【问题讨论】:
您的第一个屏幕截图没有显示 12:10 到 12:44 范围内的任何时间,因此我们很难看到第二个屏幕截图中的值来自哪里。 是否可以将这些作为文本或链接到工作表,这样我们就不必输入它们?另请参阅***.com/help/minimal-reproducible-example @TomSharpe 对不起,但数据有超过 100k 的值......这不容易。它每分钟从系统中保存... 为了强化@TomSharpe 所写的内容,创建一个数据样本和一个您想要的结果示例来自该数据。以文本格式发布,以便我们可以轻松复制/粘贴以进行测试。也许使用这个Markdown Tables Generator。我不认为这是一个困难的问题,但没有相关的例子,很难制定解决方案。 是否要将列F:G
用作 A:B
的复杂过滤器?结果在一对列中?
【参考方案1】:
如果我对您的理解正确,您正在寻找一种通过多个参数过滤数据表的方法——从开始到停止时间的时间,如 col F 中所列。
假设
日期时间按一分钟间隔列出,如您所见。F
列的开始/停止时间按该顺序列出
编辑: 日期时间的原始假设是一分钟的间隔,按分钟计算,不正确。真实数据显示时间精确到秒
方法
从 F 列创建相关时间戳的列表 将该列表应用到原始数据中的日期/时间列作为过滤器编辑:为可能加快速度而修改的代码Edit2:修改为实际数据的代码具有一秒粒度的时间编辑 3:已编辑以考虑可能连续多个“开始”,保留最后一个
M 码
let
//Be sure to change the table names in the Source= and Source2= lines to be the actual table names from your workbook
Source = Excel.CurrentWorkbook()[Name="P7_data"][Content],
#"Changed Type" = Table.TransformColumnTypes(Source,"Date/Time", type datetime, "P7 [mbar]", Int64.Type),
//get start/stop times table
Source2 = Excel.CurrentWorkbook()[Name="TStmp"][Content],
typeIt = Table.TransformColumnTypes(Source2, "Date/Time", type datetime),
#"Filtered Rows" = Table.SelectRows(typeIt, each ([#"Date/Time"] <> null)),
//if multiple "starts" in a row, remove all except the last
#"Added Index" = Table.AddIndexColumn(#"Filtered Rows", "Index", 0, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "NextLineStart",
each if Text.Contains([Info],"start", Comparer.OrdinalIgnoreCase) = true
and Text.Contains(#"Added Index"[Info][Index]+1,"start",Comparer.OrdinalIgnoreCase) = true
then "delete"
else null),
#"Filtered Rows1" = Table.SelectRows(#"Added Custom", each ([NextLineStart] = null)),
#"Removed Columns1" = Table.RemoveColumns(#"Filtered Rows1","Index", "NextLineStart"),
//create a list of all the relevant start/stop times
filterTimes = List.Combine(
List.Generate(
()=> [times = List.DateTimes(#"Removed Columns1"[#"Date/Time"]0,
Duration.TotalSeconds(#"Removed Columns1"[#"Date/Time"]1-#"Removed Columns1"[#"Date/Time"]0)+1,
#duration(0,0,0,1)), IDX = 0],
each [IDX] < Table.RowCount(#"Removed Columns1"),
each [times = List.DateTimes(#"Removed Columns1"[#"Date/Time"][IDX]+2,
Duration.TotalSeconds(#"Removed Columns1"[#"Date/Time"][IDX]+3-#"Removed Columns1"[#"Date/Time"][IDX]+2)+1,
#duration(0,0,0,1)), IDX = [IDX]+2],
each [times]
)
),
//filter the table using the list
filterTimesCol = Table.FromList(filterTimes,Splitter.SplitByNothing()),
filteredTable = Table.Join(#"Changed Type","Date/Time",filterTimesCol,"Column1",JoinKind.Inner),
#"Removed Columns" = Table.RemoveColumns(filteredTable,"Column1")
in
#"Removed Columns"
请注意,以下日期为 MDY 格式原始数据
过滤器
结果
【讨论】:
这是一个好点,但我不明白,为什么最后一步是“过滤表”?加载和崩溃主要是 Excel 需要特别长的时间......但是上一步(过滤时间)是一个好点,但我只需要 P7(压力)另外。 再说一次,“filterTimes”步骤很好,但我只需要额外的 P7 列,它对应于列表中的日期/时间,仅此而已。我需要的是我的价值观。以后我会自己做一些调整... @Mirza 您在问题中显示 两个 列作为您想要的结果。无论如何,请随意修改以适应您真正想要的任何内容。我想我无法从你介绍的内容中弄清楚这一点。不过,我可能可以加快最后一步。 使用查询输出我的错误。但我告诉你,在你的查询步骤中,我只需要对“过滤时间”步骤的位置进行小修改......,只有日期/时间是正确的,但我需要 P7 的附加列。 @Mirza 好的,如果连续有多个“开始”,我已经再次编辑代码以删除除最后一个“开始”之外的所有内容。这适用于您的示例。以上是关于匹配Excel中同一列中两个日期之间的所有值的主要内容,如果未能解决你的问题,请参考以下文章