+ Reply to Thread
Results 1 to 13 of 13

Timesheet number of hours

  1. #1
    Registered User
    Join Date
    08-21-2014
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    13

    Timesheet number of hours

    Hey,


    Apologies in advance if this has already been asked - but here's the deal.
    I'm using Google docs to make a handy time-sheet for myself. I've figured out how to make it sum up the amount of hours between start and stop times, but the following issue has proven more complex. I've tried googling quite a bit, but either I'm bad at it, or the solution is more elusive than I had imagined. So:

    Say I've worked from 14:00 to 23:00. That is 9 hours of work - easy.
    Now, from 17:00 to 22:00, I get an evening bonus to my wages. From 22:00 to 01:00 there's the night bonus. (there's also a late night bonus for 01:00 to 06:00).

    What I was hoping you guys could help me with, is make a formula that registers whether or not I've worked any hours that has bonuses, and if so, how many. (Working 14-23, I get 5 hours evening bonus (17-22) and 1 hour night bonus (22-01).

    A1 B1 C1 D1 E1
    Start Stop Evening Night Late night
    14:00 23:00 9 5 1


    I'm using the following formula to calculate the number of hours:
    =If($A1>0,Hour($B1-$A1+($B1<$A1))+Minute($B1-$A1+($B1<$A1))/60,"")

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Timesheet number of hours

    Cross-Post:
    http://www.excelguru.ca/forums/showt...umber-of-hours

  3. #3
    Registered User
    Join Date
    08-21-2014
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    13

    Re: Timesheet number of hours

    Not exactly the answer I was looking for..

  4. #4
    Registered User
    Join Date
    07-30-2011
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Timesheet number of hours

    While normally I wouldn't condone cross-posting (don't want to reinvent the wheel, or waste folks' time on other forums), but this one was straight-forward enough that I'll let it slide.

    See attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-21-2014
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    13

    Re: Timesheet number of hours

    Thank you for your valuable time and helpful answer, much obliged.

    Now, as for cross-posting.
    Cross-posting in different sub-sections of a forum, that I can see. "Cross-posting" between two Different forums? I don't get it.

    Different people use different forums at different times - so if you post a question several different places, your chances of a reply/solution increases.

    Should the same person (such as rollis13) happen to frequent the same two forums and notice an identical question having been posted two different places, he's free to ignore them. As for wasting his time? I can't say that I care - I'm not forcing him to read them. Although, obviously he did, since he took the time to inform the rest of the world of my heinous crime, instead of providing the answer - which, according to Yogi52o, was so very simple.

    I guess everything is easy once you know how to do it..

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Timesheet number of hours

    Cross-posting in same Forum is Duplicated posting.
    It's not allowed.

    Cross-posting between different forum is allowed (as you said, increase chance to get your answer quickly) only you need to put link to cross-posted question becasue if it's already answered somewhere else then it's not fair to waste our time to try to solve your (already answered) question.

    rollis13 posted a link to your other post - in case if it's solved we can skip it.

  7. #7
    Registered User
    Join Date
    08-21-2014
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    13

    Re: Timesheet number of hours

    Internet people who actually care about other internet people? I am mildly shocked to be honest.

    I will post on the Guru forum immediately, informing them of having received an answer here!

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Timesheet number of hours

    That would be nice.

  9. #9
    Registered User
    Join Date
    08-21-2014
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    13

    Re: Timesheet number of hours

    So, next problem, which I've been working on for a while now.

    My work has different bonuses for evenings, nights and late nights, as previously stated.
    However, there is also a separate bonus for weekends, starting 15:00 on Saturday and ending on 24:00 Sunday. This bonus is bigger than the evening and night bonus, but smaller than the late night bonus. Only one bonus will apply at a given hour, the biggest one, obviously.

    I need a formula that will show how many hours of weekend bonus I get, but it also needs to consider whether or not there is a late night bonus that needs to be applied. Added my current worksheet, should anyone of you have the time to help.

    So:

    A1 B1 C1 D1 E1 F1 G1 H1 I1 J1
    Day Sa Su Start Stop Hours Evening Late Night Weekend
    Saturday x 14:00 23:00 9 0 0 0 8
    Sunday x 05:00 15:00 10 0 0 1 9

    Any help would be appreciated!
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    08-21-2014
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    13

    Re: Timesheet number of hours

    So, anyone?

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Timesheet number of hours

    It's not that easy and it would be best to use UDF.
    Are you OK with that?

  12. #12
    Registered User
    Join Date
    08-21-2014
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    13

    Re: Timesheet number of hours

    Heh yeah, I've discovered it's not that easy I tried making some rather long and nasty If sentences, but have yet to make it work properly.

    I have no experience with UDF (user-defined function I take it?), but if I could get some assistance with setting it up, I sure wouldn't mind using it.

    I found an old Norwegian Excel doc that uses such a function, but it was outdated and incompatible with Google Docs.

  13. #13
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Timesheet number of hours

    Here, try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Where:
    1st range (A10) is date
    2nd range (G10) is Start time
    3rd range (H10) is End time
    4th value (J3) is to choose period:
    • 1 - Late night shift 01-06
    • 2- Day shift 06-17
    • 3- Evening shift 17-22
    • 4- Night shift 22-01
    • 5- Weekend shift

    It will ignore dates in time values (for example G14 is entered as 1.1.1900 5:00:00 and it will only take 5:00)
    Attached Files Attached Files
    Last edited by zbor; 08-29-2014 at 04:36 AM.

+ 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. [SOLVED] Timesheet that calcs time in, time out, lunch used, reg hours, ot hours, double hours
    By noobface in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-21-2021, 03:45 AM
  2. Need help with weekly timesheet to round all hours to nearest 1/4 hours
    By markjoel777 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-16-2013, 12:19 AM
  3. Timesheet formula for calculating ordinary hours and overtime hours.
    By zoen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-18-2011, 04:23 AM
  4. Calculate number of hours in timesheet
    By DMOfcMgr in forum Excel General
    Replies: 3
    Last Post: 04-26-2011, 07:18 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