View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.links
Bill Manville
 
Posts: n/a
Default Averaging Value between Two Serial Dates

Ah, so after I spent 30 minutes developing a formula for your previous
data structure you have decided to change the structure. This is much
easier to work with...

Assuming the column of meteo date/time is named MeteoDates and the
readings are named MeteoVal we can use SUMIF to get the sum of the
readings at times after the StartDateTime and subtract those which are
after the StopDateTime:
=(SUMIF(MeteoDates,StartDateTime,MeteoVal)-SUMIF(MeteoDates,StopDateT
ime,MeteoVal))/(COUNTIF(MeteoDates,StartDateTime)-COUNTIF(MeteoDates,
StopDateTime))

By the way, this question would be better suited to the
WorksheetFunctions newsgroup

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup