View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick
 
Posts: n/a
Default Need help with averaging a time but dates are messing up the result I am trying for.

Chad,

Excel stores dates as integers, with December 31, 1899 as 0, incrementing 1 for every day since
then. So June 15, 2006 is actually stored as the number
38883. This allows dates to be subtracted, etc. Anyway, Excel stores times as fractions of a day:
take the time in military format, and divide by 24. So 10 AM is 10/24, or .416666666. Date/time
values are stored as decimal nubers, so 10 AM on June 15, 2006 is 38883.4166666666 Then Excel
formats these to show the date or time however you want.

So, if the value June 16, 2006 10:00 AM is in cell A1, using

=INT(A1) will return 38883 (just the date), and using

=A1-INT(A1) will return 0.4166666666 (just the time)

So my formula returns the average of just the times.... Format the cell with my formula as time, and
it will give you the average time as a time value....

HTH,
Bernie
MS Excel MVP


"chadsxe" wrote in message
...

Bernie Deitrick Wrote:
Chad,

Array enter (enter using Ctrl-Shift-Enter)

=AVERAGE(A1:E1-INT(A1:E1))

Note that the average isn't around midnight, since times are from 0 -
Midnight to .5 Noon to 1 the
next Midnight

HTH,
Bernie
MS Excel MVP


I don't mean to sound stupid and bug you but that went way over my
head. Can you please try and explain it in a diffrent way.

Thanks

Chad


--
chadsxe
------------------------------------------------------------------------
chadsxe's Profile: http://www.excelforum.com/member.php...o&userid=35421
View this thread: http://www.excelforum.com/showthread...hreadid=552284