+ Reply to Thread
Results 1 to 8 of 8

Subtract times over 48 hours

  1. #1
    Registered User
    Join Date
    12-29-2011
    Location
    Gaithersburg, MD
    MS-Off Ver
    Excel 2003
    Posts
    12

    Subtract times over 48 hours

    I have a series of time points; the first time is the time of administration of a drug for example 21:02 { so this is two minutes past 9 in the evening}
    I have a series of times for blood samples over the next 48 hours for example the next day 6:20, 15:18, 20:14.......and then to a second day.

    I want to subtract the time of administration 21:02 from the time of these blood samples over the 48 hours. The trouble is the time interval passes through the night to the next day and then a second day..............

    Is there a formula that will calculate this time difference from 21:02 (time of drug administration) to the time of blood sampling for a number of the sampling times over 48 hours?

    Angus

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,470

    Re: Subtract times over 48 hours

    A time is a number representing a fraction of a day, that is, a 24 hour period. So, to get the time difference you can simply subtract the numbers ... but, because you're into the next day, you' Dave to add 1.

    Or, maybe a better way would be to use the date in the calculation too.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Subtract times over 48 hours

    You can adapt this to your situation.

    Start time in A1, End time in B1 format as [h]:mm

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Subtract times over 48 hours

    Include the date with the time as suggested by Trevor then it's just a simple subtraction formula.


    A2 = 12/23/2013 21:02
    B2 = 12/24/2013 6:20

    =B2-A2

    Format as [h]:mm
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,470

    Re: Subtract times over 48 hours

    As Tony has said, it's much simpler if you include the dates. See the example.


    Regards, TMS
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-29-2011
    Location
    Gaithersburg, MD
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Subtract times over 48 hours

    Thank you TM: It seems that adding 1 brings you into the next day: I am looking at the vertical column in the work you provide, but if the dates are entered as well as times then you do not need to add I...yes?

    Angus

  7. #7
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,664

    Re: Subtract times over 48 hours

    Or maybe date and time in 2 columns
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,470

    Re: Subtract times over 48 hours

    if the dates are entered as well as times then you do not need to add I...yes?
    That is correct. 1 day is 24 hours so, for example, 12:00 mid-day is 0.5.

    As popipipo has suggested, you could split the date and time into separate columns. A matter of choice and convenience.

    Regards, TMS


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Replies: 2
    Last Post: 03-02-2013, 10:57 AM
  2. [SOLVED] Formula to work out hours between 2 dates and times.. MINUS Out Of Hours
    By chris.m in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-30-2012, 08:11 AM
  3. subtract decimal hours from formatted hours
    By each in forum Excel General
    Replies: 2
    Last Post: 10-28-2008, 05:16 PM
  4. Subtract and Add times
    By tufmarkerr in forum Excel General
    Replies: 2
    Last Post: 04-22-2006, 06:10 PM
  5. Calculation of hourly rate times hours times 1.5
    By Newbusinessbod in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-06-2005, 12:50 PM

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