在Google Spreadsheet数组中查找每日最大和最小值 [英] Finding Daily Max and Min values in Google Spreadsheet array

查看:61
本文介绍了在Google Spreadsheet数组中查找每日最大和最小值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从越来越多的温度记录中选取每日的最小值和最大值,如下所示:

I need to pick the daily minimum and maximum values out of a growing array of temperature recordings like this:

日期和时间温度℃

..

2017年1月20日10:05 0.3

20/1/2017 10:05 0.3

2017年1月20日11:08 0.4

20/1/2017 11:08 0.4

..

所以结果看起来像这样:

so the result would look like this:

日期最低温度最高温度

20/1/2017 -0.5 2.2

20/1/2017 -0.5 2.2

21/1/2017 -0.3 3.0

21/1/2017 -0.3 3.0

...

我能够使用= FILTER(范围,日期条件)提取特定日期的数据,但是无法找到数组中所有日期的最小值和最大值.非常感谢您的帮助!

I was able to extract the data of a specific day using =FILTER (range, date criterion), but finding the Min and Max values for all the dates in the array eludes me. Your help is much appreciated!

推荐答案

尝试查询:

=QUERY({A:B},"select Col1, max(Col2), min(Col2) where Col1 is not null group by Col1") 

它如何工作:

  1. {A:B} 使用大括号将范围转换为数组.现在查询可能包含Col1,Col2等...
  2. 选择Col1,max(Col2),min(Col2)...按Col1分组用于制作聚合函数
  3. 其中Col1不为空,因此当使用开放范围 A:B 来消除空格时.
  1. {A:B} use curly brackets to convert range into array. Now query may contain Col1, Col2, etc...
  2. select Col1, max(Col2), min(Col2) ... group by Col1 use to make aggregate functions
  3. where Col1 is not null so when use open range A:B to eliminate blanks.

这篇关于在Google Spreadsheet数组中查找每日最大和最小值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆