+ Reply to Thread
Results 1 to 3 of 3

Average Time Query

  1. #1
    Registered User
    Join Date
    02-24-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    2

    Average Time Query

    Hi,

    Within Excel 2007, I need to calculate the average of the following time values in days, hours, minutes and seconds :

    00:18:09:26
    00:05:34:50
    00:07:41:06
    01:22:52:55
    00:00:55:48

    I've tried using =AVERAGE(A1:A5) and changing the format of the values to various settings, but keep getting DIV/O as the result.

    Help ????

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Average Time Query

    Those aren't valid time values in Excel so you get an error because Excel treats them as text. Two possible approaches

    With an array formula

    =AVERAGE(LEFT(A1:A5,2)+RIGHT(A1:A5,8))

    confirmed with CTRL+SHIFT+ENTER

    or a "regular" formula

    =SUMPRODUCT(LEFT(A1:A5,2)+RIGHT(A1:A5,8))/COUNTA(A1:A5)

    In both cases I assume all cells have data (no blanks). Format result cell as [h]:mm:ss
    Audere est facere

  3. #3
    Registered User
    Join Date
    02-24-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    2

    Smile Re: Average Time Query

    Quote Originally Posted by daddylonglegs View Post
    Those aren't valid time values in Excel so you get an error because Excel treats them as text. Two possible approaches

    With an array formula

    =AVERAGE(LEFT(A1:A5,2)+RIGHT(A1:A5,8))

    confirmed with CTRL+SHIFT+ENTER

    or a "regular" formula

    =SUMPRODUCT(LEFT(A1:A5,2)+RIGHT(A1:A5,8))/COUNTA(A1:A5)

    In both cases I assume all cells have data (no blanks). Format result cell as [h]:mm:ss
    Great the second formula worked a treat - many thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1