简体   繁体   中英

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 ).

=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).

I can get the absolute maximum for each season by replacing AVERAGE with MAX .

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

Just add 1 extra column to 'collect' you daily maximum temperature and 1 more column for daily minimum temperature. Then use the same AVERAGE or AVERAGEIFS formula to work on each of these column to obtain your intended results.

Hope that helps. ( :

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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