Results 1 to 10 of 29

Thread: Code Required to calculate number of days worked, normal overtime and holiday overtime

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Jan 2017
    Posts
    9
    Rep Power
    0
    Dear Alan,

    TOTAL NO. OF DAYS ----->25 ,i.e, Absent 4 days plus one holiday (5 days) - Absent days are 29,31,9,19 and 30 (the employee did not come on 29 and 31 so 30 holiday marked as absent).......

    Rest explained in attached file

    Thanks,

    Nelson
    Attached Files Attached Files

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    Hi Nelson,
    Quote Originally Posted by nelsondavid View Post
    ...(the employee did not come on 29 and 31 so 30 holiday marked as absent)......
    This I now understand ( It was impossible to know this as the code was not putting ABSENT in. I can do this and understand now
    Code:
    Using Excel 2007 32 bit
    
    BEFORE
    29.Dec.16
    30.Dec.16
    31.Dec.16
    AFTER
    29.Dec.16
    ABSENT
    30.Dec.16
    ABSENT
    31.Dec.16
    ABSENT
    Worksheet: Sheet1
    _................................................. .........


    Quote Originally Posted by nelsondavid View Post
    ...
    TOTAL NO. OF DAYS ----->25 ,i.e, Absent 4 days plus one holiday (5 days) - Absent days are 29,31,9,19 and 30 (the employee did not come on 29 and 31 so 30 holiday marked as absent)....
    OK This makes sense now
    ( You forgot to put ABSENT in 30. December , ( "File 4 After.xlsx" )
    This was your After ( "File 4 After.xlsx" )
    29.Dec.16
    ABSENT
    30.Dec.16
    31.Dec.16
    ABSENT
    Worksheet: 121

    It should have been this !!!
    29.Dec.16
    ABSENT
    30.Dec.16
    ABSENT
    31.Dec.16
    ABSENT
    Worksheet: 121
    _............................

    I think I understand now
    I will have time to look again at this tomorrow



    Alan
    Last edited by DocAElstein; 02-08-2017 at 10:32 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Replies: 33
    Last Post: 01-12-2015, 10:08 AM
  2. Replies: 1
    Last Post: 07-23-2013, 10:43 PM
  3. Replies: 0
    Last Post: 09-17-2012, 02:05 PM
  4. The Number of Years, Months and Days Between Two Dates
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 7
    Last Post: 06-08-2012, 10:35 PM
  5. Number of Days In A Month
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 05-14-2011, 08:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •