+ Reply to Thread
Results 1 to 9 of 9

Calculating the difference between time stamps

  1. #1
    Registered User
    Join Date
    12-12-2013
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    2

    Calculating the difference between time stamps

    I've got a spreadsheet of samples taken at certain time intervals for a period of 2.5 hours, they were collected in hh:mm:ss format. Most of them are approximately 5 minutes apart. What I'd like to do is convert the first time to 00:00:00 and then recalculate each sample from there. Is there an easy way to do this?

    So, what looks like this right now:
    8:45:00
    8:45:36
    8:50:36
    8:55:36
    9:00:36

    Would look like this:
    00:00:00
    00:00:36
    00:05:36
    00:10:36
    00:15:36
    etc...

    Thank you!

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Calculating the difference between time stamps

    Type 08:45 into a random cell, then copy.

    Highlight the cells you wish to amend, right-click, paste special, and select 'subtract'.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Calculating the difference between time stamps

    Hi and welcome to the forum

    If your data is in column A, starting at A1, put 0:00:00 in B1, then in B2, copied down...
    =A2-$A$1
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    12-12-2013
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Calculating the difference between time stamps

    See, this is why I turn to the experts. I knew the concept but had no idea how to get there (and figured it would be just that easy...)

    Thanks so much!

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Calculating the difference between time stamps

    well with that sample in a1:a5 in b1 filled down
    =A1-$A$1
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Calculating the difference between time stamps

    Like this??

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Where your list begins in A1 (i.e. 8:45:00)

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Calculating the difference between time stamps

    Beaten to it... I started in B2, by the way.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Calculating the difference between time stamps

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Calculating the difference between time stamps

    Happy to help and thanks for the feedback

+ 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. [SOLVED] DIFFERENCE BETWEEN TWO TIME STAMPS AS DECIMAL
    By Giulia in forum Excel General
    Replies: 4
    Last Post: 07-24-2014, 10:13 AM
  2. [SOLVED] Difference between two time stamps
    By Thinker8 in forum Excel General
    Replies: 2
    Last Post: 09-24-2013, 03:17 AM
  3. Excel 2007 : Difference between two Date Time Stamps
    By Sedlacek2001 in forum Excel General
    Replies: 3
    Last Post: 05-15-2012, 11:12 AM
  4. Excel 2007 : Difference between two time stamps
    By rwinsett in forum Excel General
    Replies: 3
    Last Post: 02-21-2012, 06:09 PM
  5. Calculate difference between two time stamps...
    By chi11 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-21-2011, 09:31 PM

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