简体   繁体   English

如果在Excel中的日期/时间范围内,则平均每日最高/最低温度

[英]Average daily max/min temperature if within date/time range in Excel

I have the following array formula which calculates the average daily temperature for a season (outlined in more detail here: Average day and night temperature in excel ). 我有以下数组公式,用于计算一个季节的平均每日温度(此处详细概述: excel中的日夜平均温度 )。

=AVERAGE(IF(Sheet1!$C$7:$C$17622>=$A$20,IF(Sheet1!$C$7:$C$17622<$A$21,IF(Sheet1!$B$7:$B$17622>=$B18,IF(Sheet1!$B$7:$B$17622<$B19,OFFSET(Sheet1!A$7:A$17622,0,(COLUMN(Sheet1!A$7)*3)))))))

The OFFSET function is to account for alternating columns of temperature and humidity for each site (site temperature/humidity are in columns in Sheet1; there are four columns for each site, hence the *3). OFFSET功能用于考虑每个站点的温度和湿度的交替列(站点温度/湿度在Sheet1的列中;每个站点有四列,因此为* 3)。

I can get the absolute maximum for each season by replacing AVERAGE with MAX . 通过用MAX代替AVERAGE可以得到每个季节的绝对最大值。

However, I would like to obtain the average maximum/minimum daily and nightly temperatures for each season, but I cannot figure out how to do it (after several hours). 但是,我想获取每个季节的每日最高和最低平均温度,但我无法弄清楚该方法(几个小时后)。 I'd appreciate it if anyone could help me out here. 如果有人可以在这里帮助我,我将不胜感激。

Sample data here: https://www.dropbox.com/s/9brbxjbcrhjwrhc/Climate%20by%20season.xlsx?dl=0 此处的示例数据: https : //www.dropbox.com/s/9brbxjbcrhjwrhc/Climate%20by%20season.xlsx?dl=0

Just add 1 extra column to 'collect' you daily maximum temperature and 1 more column for daily minimum temperature. 只需添加1个额外的列即可“收集”您的每日最高温度,再增加1个列即可获取每日最低温度。 Then use the same AVERAGE or AVERAGEIFS formula to work on each of these column to obtain your intended results. 然后,使用相同的AVERAGEAVERAGEIFS公式对这些列中的每一个进行处理,以获得所需的结果。

Hope that helps. 希望能有所帮助。 ( : (:

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

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