+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Adding Time and Duration

  1. #1
    Registered User
    Join Date
    12-30-2008
    Location
    Miami, FL
    MS-Off Ver
    Excel 2007
    Posts
    3

    Adding Time and Duration

    Hello,

    I am trying to add two time values and have thus far been unsuccessful:

    The first value is a "Start Time" which can be expressed as 13:00 (military time = 1 PM).

    The Second Value is the duration which is expressed in seconds - 3600 (as in 3600 seconds = 60 minutes).

    What I would like to calculate is the "Stop Time" for this event.

    To Elaborate: Start Time + Duration = Stop Time
    For this example the expected result would be 13:00 + 3600 seconds = 14:00

    I have tried every time formatting variation I could think of, however the "duration" value is always displayed as a time and not a duration.

    Any help with this will be greatly appreciated.
    Last edited by miamialbert; 12-30-2008 at 02:59 PM. Reason: Related Question

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Welcome to the forum, how about

    =A1+(B1/86400)
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Displaying a duration like a "time"

    The 3600 you want to display is not a time...but, perhaps a custom number format can help.

    Select the cell
    <format><cells><number tab>
    Category: Custom
    Type: General" sec"
    Click [OK]

    Now, 3600 will display as: 3600 sec

    Next...To Excel, time is calculated as a percentage of a day.
    Noon is 0.5 (half a day)

    Your formula will need to convert the duration (in seconds) to a percentage of a day.

    Try this to calculate StopTime:
    =+A1+B1/(60*60*24)

    (60 sec/min * 60 min/hr * 24 hrs/day)


    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    12-30-2008
    Location
    Miami, FL
    MS-Off Ver
    Excel 2007
    Posts
    3
    Old Chippy and John,

    Thanks for the lightening fast replies. The solutions work!

    Great Forum!
    Best,
    Albert

  5. #5
    Registered User
    Join Date
    12-30-2008
    Location
    Miami, FL
    MS-Off Ver
    Excel 2007
    Posts
    3

    Calculating Concurrent Events (Calls)

    Hello Forum,

    Hopefully I'm not coming back to the well too soon. The solution provided worked, however, after several failed attempts using pivot tables and scatter graphs, I have been unable to actually complete my task.

    What I am trying to do is to establish the maximum number of concurrent events (phone calls) based on the Start Time and End Time.

    I am attaching a sample spreadsheet with the values. This spreadsheet is just a sample, the actual data I am working with has about 100,000 rows (using Excel '07). Any direction would be greatly appreciated.

    BTW - I am new to the forum and am uncertain if this additional question should be posted in the same thread, or if I should have established a new thread. If I posted it to this thread inappropriately - my apologies.

    Best,
    Albert
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    In D2 and copy down,

    =COUNTIF(C$2:C2, ">" & A2)

    ... counts the calls in progress including the given call. It tells you that when the call on line 13 started, it became the eighth concurrent call, the max that occurred.

    That approach isn't going to scale well for 100,000 calls.

    I don't see a simple formula solution at a glance, though there may well be one.

    It should be easy and fast in VBA, though; can you post a larger sample of data (a few thousand calls?)
    Last edited by shg; 12-30-2008 at 06:54 PM.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Maybe an alternative?

    =COUNTIF(C2:C16,"<"&MAX(A2:A16))

  8. #8
    Registered User
    Join Date
    12-20-2008
    Location
    US
    MS-Off Ver
    Excel 2007, Student Version
    Posts
    33
    Excel 2007
    Chart showing start and duration of calls
    in Gantt format and line chart of number
    of concurrent calls.
    Sample period is ten seconds.
    http://www.mediafire.com/file/jldgm3...tart_stop.xlsx

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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