+ Reply to Thread
Results 1 to 9 of 9

Calculation to Provide Difference Between Two Times Less a Break

  1. #1
    Registered User
    Join Date
    07-09-2014
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    7

    Calculation to Provide Difference Between Two Times Less a Break

    Hi All,

    I'm new to this forum and this is my first post so hope not to break any rules straight away.

    I currently have 3 columns. One is start time, 2nd is finish time and 3rd is break time. I would like to complete the following:

    Enter the times in the first two columns as 24 hour time without having to add the colon e.g. instead of 15:45 I would like to type 1545.
    Enter the break time (if any) as 0.5 which represents half an hour.
    Have a fourth column that calculates the difference between the start and finish time less any break, but have the final result show as hours and mins using a decimal point e.g. 8.75hrs

    Example is someone starts at 05:15 and finishes at 14:30 and had a half hour break. Total hours less break is 8.75hrs. I would like to type 0515 column 1, 1430 column 2, 0.5 column 3, with the result being 8.75 column 4.

    Is this possible? I am open to alternative solutions. Any help would be greatly appreciated.
    Dave

  2. #2
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Calculation to Provide Difference Between Two Times Less a Break

    HI ,

    try this it is very simple .

    Punnam
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-09-2014
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    7

    Re: Calculation to Provide Difference Between Two Times Less a Break

    Hi Punnam,

    Thanks for your help. Your solution certainly works however I would like to be able to type the 24hr time in without having to type the colon :

    The colons can be quite time consuming to typ when there is alot of data. I don't mind if the colon shows up after but my ultimate aim is not to have to type it in. Is this possible?

  4. #4
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Calculation to Provide Difference Between Two Times Less a Break

    hI,

    try this Updated

    Punnam
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-09-2014
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    7

    Re: Calculation to Provide Difference Between Two Times Less a Break

    Thanks Punnam

    Works like a charm. That's the longest formula I have ever seen

    Cheers

  6. #6
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Calculation to Provide Difference Between Two Times Less a Break

    Ltradey,

    Yes this can even shortened, but it will take some time for me
    If u r locking for small formula u can wait for more reply. If u r satisfied u can mark the thread as sloved .
    u can even thank me by adding some reputation point by using Star Button .
    Punnam

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Calculation to Provide Difference Between Two Times Less a Break

    Quote Originally Posted by ltradey View Post
    That's the longest formula I have ever seen
    Here is the shorter verson of Punnam formula

    =ABS(TEXT(B2,"00\:00")-TEXT(A2,"00\:00"))*24-C2


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  8. #8
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Calculation to Provide Difference Between Two Times Less a Break

    find the attached file
    Attached Files Attached Files
    Last edited by samba_ravi; 07-10-2014 at 02:27 AM.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  9. #9
    Registered User
    Join Date
    07-09-2014
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    7

    Re: Calculation to Provide Difference Between Two Times Less a Break

    Thank you All,

    Very helpful indeed. Shorter formula works perfectly.

    Cheers
    Dave

+ 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: 4
    Last Post: 07-23-2013, 07:51 AM
  2. Compare 2 rows and (if they match), provide difference between 2 dates
    By PastramiDave in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2012, 02:43 PM
  3. Replies: 0
    Last Post: 11-14-2011, 05:40 PM
  4. 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
  5. [SOLVED] Difference Escape and Ctrl + Break to interrupt code
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-25-2005, 03:06 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