+ Reply to Thread
Results 1 to 6 of 6

Calculate Hours & Mins

Hybrid View

  1. #1
    Registered User
    Join Date
    11-05-2007
    MS-Off Ver
    Mac 2011
    Posts
    98

    Calculate Hours & Mins

    Hi,
    I am trying to make up a time sheet that will allow me to add up the Hours & Mins between a start & finish time, I want it to display the time worked in the following format

    Column A - start Time 19:00
    Column B - Finish Time 22:03
    Column c - Total 3hrs 3mins

    I have used the following formula but it requires you to put in the date also, which I would like to remove but not sure how?
    =TEXT(TRUNC(A2)+(B2-A2),"dd""/""mm""/""yy"" - ""hh"" Hrs ""mm"" Mins """)

    The second part I need is for it to work out how much i would be paid for the 3hrs and 3mins at £6.00 per hour, Again I have a formula below but it works it out as time worked 3.05 but need it to display as 3hrs 3mins
    =ROUND(IF((OR(E15="",F15="")),0,IF((F15<E15),((F15-E15)*24)+24,(F15-E15)*24)),2)

    I guess what I am trying to ask for, is there one formula that does the job of these two?

    Thanks

    Justin.

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    =B2-A2. Then create a custom format of h"hrs "m"mins"
    The second formula can then be =C2*24*6.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,727
    If shift crosses midnight, e.g. 22:00 to 06:00 then try

    =MOD(B2-A2,1)

  4. #4
    Registered User
    Join Date
    11-05-2007
    MS-Off Ver
    Mac 2011
    Posts
    98
    Thanks guys, easy when you know how!


    Cheers


    Justin.

  5. #5
    Registered User
    Join Date
    11-05-2007
    MS-Off Ver
    Mac 2011
    Posts
    98

    Re Time Calculation

    Just another quick question with the time calculation
    I have used the formula
    =B2-A2. Then formated of h"hrs "m"mins"

    When I add up all the days it is coming up with weird numbers, is there any way that I can get it to add them all up correctly

    Monday 09:00 19:00 10 Hrs 0 Mins
    Tuesday 0 Hrs 0 Mins
    Wednesday17:00 22:01 5 Hrs 1 Mins
    Thrsday 17:00 22:01 5 Hrs 1 Mins
    Friday 17:00 22:01 5 Hrs 1 Mins
    Saturday 17:00 22:01 5 Hrs 1 Mins
    Sunday 0 Hrs 0 Mins
    Total 6 Hrs 4 Mins

    As you can see it should read 30hrs 4 mins not 6 as above, any ideas?

    Thanks again

    Justin.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963
    Put this in column C:
    =DOLLARDE(24*(B3-A3)+24*(A3>B3),60)
    This will calculate the time span in DECIMAL hours, not hours and minutes, i.e., 5.1 hrs v. 5:06.
    If you prefer hours & minutes, then you can replace the DE with FR; however, the calculation will show 5:06 as 5.06 which might be kind of deceptive.
    Ben Van Johnson

+ 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