+ Reply to Thread
Results 1 to 2 of 2

Calculating the average elapsed time in Excel 2010

  1. #1
    Registered User
    Join Date
    04-19-2011
    Location
    Columbus, OH US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question Calculating the average elapsed time in Excel 2010

    In our sql server table, we have a field of type DATETIME. This field is populated by a vendor product with the elapsed time of an event.

    We created a SQL Server view of this column and other columns of info joined together from several tables.

    Then we create in Excel 2010 a new spreadsheet with a data connection to the SQL Server, instance, and view that we created.

    Excel 2010 displays each of the columns in our view.

    The elapsed time column appears as "dd hh:mm:ss". However, when we click on a cell to look at its formatting, Excel lists it as general.

    We want to calculate the average time in this column.

    We go down below the data, click on a cell, and insert =Average(C2:C17215) and we get an error saying dividing by zero.
    That's nonsense - we have 17,000+ rows of data, so there is no divide by zero math going on here.
    Each row in this column has data, so there are no blank cells.

    We have spent some time web searching. We then tried various methods of calculating this. Nothing has worked. In most cases, we get the divide by zero. We tried some solutions that mention using an array forumula, but that just changed the error to an invalid value error.

    This seems like such a common thing that people would want to do, we must be missing something simple.

    Does anyone have any insights on what we are missing in getting this to work?

    Thank you.

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Calculating the average elapsed time in Excel 2010

    lvirden,

    Welcome to the forum. I suspect - perhaps incorrectly, but nevertheless, I suspect - that your DATETIME string may be causing problems, expecting a DATE & TIME, rather than a number of days & a TIME.

    Can you upload a workbook containing a small sample of the data in Column C of your workbook - say C2:C20?
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. calculating Elapsed Time in Excel
    By lveitz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-11-2013, 11:10 AM
  2. Replies: 1
    Last Post: 03-12-2012, 12:09 PM
  3. Converting and calculating average elapsed time
    By jamminalley in forum Excel General
    Replies: 7
    Last Post: 03-12-2012, 10:31 AM
  4. [SOLVED] Calculating Time Elapsed in Excel
    By [email protected] in forum Excel General
    Replies: 11
    Last Post: 01-20-2006, 01:15 AM
  5. [SOLVED] Calculating Time Elapsed in Excel
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-20-2006, 01:15 AM

Tags for this Thread

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