+ Reply to Thread
Results 1 to 3 of 3

Excel 2010 Formula to subtract one date and time from another (within certain times!)

  1. #1
    Registered User
    Join Date
    05-30-2013
    Location
    Aberdeen - Scotland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Lightbulb Excel 2010 Formula to subtract one date and time from another (within certain times!)

    Hi guys!

    I'm looking for a solution (which I guess will be found by means of a complex formula) to substract column I in the attached spreadsheet from column H. This will give me a ‘time taken’ total. I need the total for each row
    to show in hours and minutes only. But importantly if for example it is more than 1 day, it needs to read as e.g. 25hours, 20 minutes.

    Importantly, the ‘clock’ has to only tick during office hours i.e. 8 am til 4pm. Therefore the ‘time taken’ totals need to be based on 8am til 4pm mon to fri only, and must exclude evenings and weekends.


    I then need the function to determine whether this is more or less than a permitted standard of 4 hours. If it less than 4 hours I need it to return a value of Yes in column K. If not, then value should be No in column K.

    Any assistance here much appreciated!!!

    Many thanks
    Justin
    Attached Files Attached Files
    Last edited by justin8260; 05-30-2013 at 11:13 AM.

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Excel 2010 Formula to subtract one date and time from another (within certain times!)

    Hi justin8260

    If I have followed you correctly! Try in J2 and copy down. The cells in the formula Q1=16:00 & P1=08:00.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And format the cells as "[h]:mm" (without the quotes).

    Then in K2 and copy down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See the attached file.
    Attached Files Attached Files
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  3. #3
    Registered User
    Join Date
    05-30-2013
    Location
    Aberdeen - Scotland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Excel 2010 Formula to subtract one date and time from another (within certain times!)

    Hi Kevin,

    this is superb! Thanks so much for taking the time to work on this

    Your profile does what it says on the tin - "Forum Expert" !

    Cheers again
    Justin

+ 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