+ Reply to Thread
Results 1 to 3 of 3

How to calculate the difference between 2 times of day & show 1/2 hr as .5 & not .3

Hybrid View

  1. #1
    Registered User
    Join Date
    10-18-2008
    Location
    St John's, Newfoundland, Canada
    MS-Off Ver
    365
    Posts
    90

    Question How to calculate the difference between 2 times of day & show 1/2 hr as .5 & not .3

    My Title/Question even confuses myself, so let me try and explain! I have searched for this and found some answers but nothing that fits my query exactly.

    I have cell D4 and E4 that show a start time and finish time of a shift (eg D4 is 21:30 and E4 is 23:59). I have figured out how to calculate how many hours it is, and how to round the figure to the next 1/2 hour:

    =ROUND(SUM(E4-D4)*48,0)/48

    The problem with this is that it shows the result as 2.30, which is obviously 2hrs and 30mins, but I need to show the result as 2.50 (2 1/2 hrs) because that cell will then be linked to an hourly rate of pay.

    So, how can I change it so that the result shows as 2.5?

    Any help would be greatly appreciated.
    Cheers
    Glenn
    Last edited by gloriousglenn; 01-13-2012 at 08:24 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: How to calculate the difference between 2 times of day & show 1/2 hr as .5 & not

    Formula:
    =CEILING(E4-D4,1.25/60)*24

    Format as General
    Last edited by tigeravatar; 01-12-2012 at 05:21 PM.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-18-2008
    Location
    St John's, Newfoundland, Canada
    MS-Off Ver
    365
    Posts
    90

    Re: How to calculate the difference between 2 times of day & show 1/2 hr as .5 & not

    Perfect! Thank you so much. I have never used the 'CEILING' formula before, so I would have never have figured it out! Thanks again.

+ 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