+ Reply to Thread
Results 1 to 18 of 18

Calculation of entry / exit working hours by reporting minutes / hours missing from a tota

  1. #1
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Calculation of entry / exit working hours by reporting minutes / hours missing from a tota

    Hello, I would like your help to find a formula for calculating missing hours in the working time between entry and exit which can be on 2 or 4 columns.
    In the attached file you will find the standard hours 08.00-14.00 - 14.30-17.30
    total 09.00 hours.

    All missing hours and minutes during this period must be reported.

    From 14.00 to 14.30 Lunch break should not be considered.

    Some examples 08.10-14.30 are missing 03.10
    * 9 total hours less from 08 to 14 are 6 hours remains 3 hours
    however, we entered at 08.10 so 10 warnings must be marked = 3.10

    Other examples in the file with IF formulas inserted
    but, to find all the initiations with IF, it becomes too long.
    Thank you
    Attached Files Attached Files
    Last edited by Berna11; 03-09-2020 at 12:42 PM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,642

    Re: Missing time

    Probably I've made it too complicated, but it seems to work fine. The formula do not use IFs - Uses MAX and MIN instead.
    so we have in G4 (and copied down):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    breaking it into pieces (you may test these one by one) we have:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    is total expected time (9hrs)

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    is total time from check-in to check-out

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    is the length of break between 2:00pm and 2:30pm (if it is included in reported working hours
    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    is a correction for late start (column D) after the break (if taken)
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,608

    Re: Missing time

    Here is single simple formula.
    In H4 then copied down.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 03-09-2020 at 11:30 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Missing time

    Please try at H5
    =ROUND(9/24-(MIN(C5,$E$4)-MAX(B5,$B$4))+MAX(0,MIN($D$4,C5)-MAX($C$4,B5))-(MIN($E$4,E5)-MAX($D$4,D5))*(D5>0),5)
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Missing time

    Fantastic...
    all 3 proposals work ...
    with a small formula you got what I could not get with a huge formula.

    here are 2 little things If Marted́ is written in column A.
    the formula must give the result, if there is no time it must give 09.00
    if column A = white or different from Marted́ 0.00.
    as the last few lines
    Thank you
    Attached Files Attached Files

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Missing time

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  7. #7
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Adjusted title
    Thank you

  8. #8
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,642

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Remember to use i with accent (not a dot) - unfortunately oon this website it is replaced with standard i

  9. #9
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Thank you
    Resolved

  10. #10
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Hello, sorry if I return on the problem but, there are cases where it doesn't work.
    If return time is less than 2.30pm
    :Hello, sorry if I return on the problem but, there are cases where it doesn't work.
    If return time is less than 2.30pm

    example
    08.00 10.00 11.00 17.30
    08.00 12.00 13.00 17.30
    07.05 10.00 11.00 17.30

    can you fix it?
    thanks as always

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,608

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Upload file with results with problem highlighted

  12. #12
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    yes here are the last 3 lines
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,608

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    How J10=2 and J11=3.
    In H4 then copied down.
    Please Login or Register  to view this content.
    Or
    Please Login or Register  to view this content.
    Attached Files Attached Files

  14. #14
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,642

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    My proposition:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Kaper; 03-10-2020 at 06:42 AM.

  15. #15
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Hi, you are very good and kind.
    If other anomalous cases do not emerge
    that's okay.
    Thank you

  16. #16
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Please try at I4
    =(A4="Marted́")*$L$1-((B4>0)*(MIN(C4,$P$1)-MAX(B4,$M$1)-MAX(0,MIN(C4,$O$1)-MAX(B4,$N$1)))+(D4>0)*(MIN(E4,$P$1)-MAX(D4,$M$1)-MAX(0,MIN(E4,$O$1)-MAX(D4,$N$1))))
    Attached Files Attached Files

  17. #17
    Forum Contributor
    Join Date
    05-16-2012
    Location
    Latina, ITALY
    MS-Off Ver
    Excel 2010--2016
    Posts
    947

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Thanks also to you Bo_RY

  18. #18
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,642

    Re: Calculation of entry / exit working hours by reporting minutes / hours missing from a

    Glad to see thread solved and thanks for reputation points

    I hope we covered most of possible situations. Two exceptions I'm aware of: somebody writen only second part (columns D:E while B:C left empty) or the work finished (columns C or E) after midnight
    Last edited by Kaper; 03-11-2020 at 03:39 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. Replies: 14
    Last Post: 01-08-2019, 08:16 AM
  2. [SOLVED] How to VBA for a Table missing Time increments
    By Ccc5sports in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-13-2018, 01:54 PM
  3. [SOLVED] Identifying missing time increments
    By CLIMATEGURU in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-31-2018, 06:39 PM
  4. Drag down formula missing out a row each time.
    By kcaseykc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-09-2015, 06:26 AM
  5. [SOLVED] Insert missing time rows
    By rajre in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-12-2014, 01:50 AM
  6. Add missing Time in cells with a date
    By rdawes26 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2013, 01:29 PM
  7. Replies: 2
    Last Post: 04-10-2013, 11:17 AM

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