+ Reply to Thread
Results 1 to 9 of 9

Automatically exclude 1 hour lunch break

  1. #1
    Registered User
    Join Date
    09-13-2013
    Location
    Davao City, PH
    MS-Off Ver
    Excel 2007
    Posts
    4

    Question Automatically exclude 1 hour lunch break

    Hi everyone!

    Can someone help me?

    I have to create a schedule which incorporates lunches automatically. The schedule only has time in and time out, but I need excel to automatically deduct the lunch break between 12:00 am to 1:00 pm.

    I can't put lunch breaks seperately, so all I have to work with is Time in/out in AM and PM and the total hours. I have a problem with computing the total hours in a day automatically if the time log ends up like this:

    AM = 8:00 to 12:20
    PM = 12:55 to 5:00

    Also, I wouldn't be able to use military time, so I don't know how excel can assume that time in is in the morning, and time out is in the evening and/or half-day.

    Please help.

  2. #2
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: Automatically exclude 1 hour lunch break

    Please try this file.
    Attached Files Attached Files
    Please click 'Add reputation', if my answer helped you.

  3. #3
    Registered User
    Join Date
    09-13-2013
    Location
    Davao City, PH
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Automatically exclude 1 hour lunch break

    Hey ramananhrm!

    Thanks for the help!

    But there's just one problem with the formula you made. What I had in mind was for the time between 12:00AM to 1:00PM excluded altogether even if the time log was like the sample I posted previously. Is there any way that you can help me with that?

    Appreciate your help.

  4. #4
    Registered User
    Join Date
    02-22-2013
    Location
    India
    MS-Off Ver
    2010
    Posts
    87

    Re: Automatically exclude 1 hour lunch break

    Hey


    I think this may help you. see the attachment n follow the steps if your problem is still persist then upload your excel file with some more details...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-13-2013
    Location
    Davao City, PH
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Automatically exclude 1 hour lunch break

    Hey amarjeet.it!

    Thanks for your idea. I still can't figure this out.

    I attached a sample for what I need in to get done.

    Thanks for the help pips.
    Attached Files Attached Files

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Automatically exclude 1 hour lunch break

    See attachment.

    I have amended the formatting of your afternoon times, to display time as am/pm. This allows times to be stored correctly.

    I have included a formula to calculate the total working hours, based on excluding 12:00 - 13:00.

    I hope this matches your requirement.
    Attached Files Attached Files
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  7. #7
    Registered User
    Join Date
    02-22-2013
    Location
    India
    MS-Off Ver
    2010
    Posts
    87

    Re: Automatically exclude 1 hour lunch break

    Hey samaine,

    Hope this will help you for sure...

    you must enter time in correct format as AM or PM which is required accordingly...
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-13-2013
    Location
    Davao City, PH
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Automatically exclude 1 hour lunch break

    Hey guys!

    Thanks for all your help. I finally found the right formula for the daily time record that I'm tasked to do. Thanks so much for all your help.

    Till next time!

  9. #9
    Registered User
    Join Date
    02-22-2013
    Location
    India
    MS-Off Ver
    2010
    Posts
    87

    Re: Automatically exclude 1 hour lunch break

    Welcome...


    if your task is done then not to forget to mark this post as "solved" from Thread tools option

+ 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: 1
    Last Post: 07-03-2015, 06:57 AM
  2. [SOLVED] Can't pull someone's lunch and break at a given time
    By Shellybelly in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-23-2013, 09:01 AM
  3. Lunch Break Timings Calculations
    By paulmichaelfarrow in forum Excel General
    Replies: 4
    Last Post: 06-05-2012, 09:40 AM
  4. time calculation without lunch hour
    By Harrold in forum Excel General
    Replies: 7
    Last Post: 01-29-2012, 02:49 AM
  5. Calculating time, potential lunch break
    By B1123 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-13-2008, 09:18 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