View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Averaging all values for each hour???

Jennifer: To perform this average you need to calculate the sum and divide by
the total number of enties that meet the requirements. A date is a number
with 1 starting at Jan 1, 1900 and incrementing by one for each Day. Hours
are a fraction of a day which is 1/24 for each hour and 1/(24 * 60) for each
minute.

Suppose your time is 6/7/08 6:30 AM the number for this is 39606.2708333333


First you have to extract the correct date which is 39606. To get this
number you use the INT function. The hour is .25 which is (6 hours/24
hours). The Hour function will get this information. Now you have to
compare both the Day and Hour to get the correct data.

You need to perform this test in both numerator (the total) and the
denominator (the number of values to sum). This account for 3 different
terms in the numerator and and 2 diferent terms in the denominator. The
function needs 5 different terms which is why the formula looks complicated.


"Jennifer" wrote:

The other thing to keep in mind is that my data set is over a two week
period, not over one day...so the date is something else to watch! Why is
this so complicated??

:(



"Jennifer" wrote:

I have been trying for hours to try to figure this out. I have data that has
been recorded every few minutes over a two week period for temperature, say
time is in column A in mm/dd/yy hh:mm:ss and my temperature is in column B. I
have many different data sets not taken at equal times. Is there a way to
Average the temperature over each hour? so... formulate an If statement or
something like that where If(still in the same hour):then(add to previous
total/average)?

Any help would be great!!!
:)