I have an Excel spreadsheet with imported data from an AWOS weather station. Column A is the date and time (in standard Excel Date/Time format). Columns B, C, etc are temperature, dew point, etc. There are typically about 3 data samples per hour but this sampling rate is not fixed -- it can vary due to missing reports or due to increased reporting frequency because of rapidly changing weather conditions. I want to make a column that is a moving average of the last 24 hours of temperature data. I have done so using the following array formula,
{=AVERAGE(IF(A12685:A12856>(A12856-1),B12685:B12856, FALSE))}
It works, but it seems clumsy and it is computationally expensive. Indeed, as the spreadsheet has grown quite large there is now a noticeable delay upon opening. I recently had two such spreadsheets open at the same time and things really bogged down.
There must be a better way. The following will give me the value of the temperature that is 24 hours before the current time stamp (note: current time stamp in this example is at A12856).
=VLOOKUP(A12856-1,A15:B12856,2)
But what I need is the row number in which that temperature resides and some way to use that row number in an AVERAGE() function to average all temperatures from that row to the current row.
Again, I’m seeking to replace the present array formula with a method that is less computationally expensive.
Thanks for any help.
Bookmarks