Forum Discussion
jessisavage
Feb 24, 2019Copper Contributor
Daily Preciptation Data Select Help
Hello, I have some daily data for precipitation and temperature from a weather station. There are 40 years of data, and I am interested in looking at the precipitation data for the months of May ...
jessisavage
Feb 24, 2019Copper Contributor
Thank you! That is very helpful.
Do you know how to efficiently calculate the same metrics (number of days and average precipitation) for every May for all 40 years, every June for all 40 years, and for May and June together for all 40 years?
For example, May 1980 experienced 5 days of precipitation.
And, average precipitation for May 1984 was 3.45 cm
Is there a way to set up a macro so that the output for these calculations are organized into a table?
SergeiBaklan
Feb 25, 2019Diamond Contributor
If you have both year and month you may use AVERAGEIFS. For example, for result data structured as
you may use in G2
=IFERROR(AVERAGEIFS($C$2:$C$3678,$B$2:$B$3678,">="&DATE($F2,COLUMN()-COLUMN($F$1),1),$B$2:$B$3678,"<="&EOMONTH(DATE($F2,COLUMN()-COLUMN($F$1),1),0)),"-")
and drag it down and to the right.
Please see the sample attached. In second sheet is the same for tables.