+ Reply to Thread
Results 1 to 7 of 7

subtractct Lunch Time

  1. #1
    Registered User
    Join Date
    08-26-2010
    Location
    Poplar Bluff MO
    MS-Off Ver
    Excel 2016
    Posts
    98

    subtractct Lunch Time

    I have a formula on the attached workbook. It currently gives me the hours worked during the day. I need it to back out 30 minutes for lunch.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: subtractct Lunch Time

    just add -0.5 to the end of the formula. You'll need to reformat the cell as general. Did that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    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,626

    Re: subtractct Lunch Time

    In other words, and referring directly to your workbook:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    And as ChemistB mentioned, remember to restore cell format to general because excel will notice you are working on a date/time cells and will set time format automatically
    Best Regards,

    Kaper

  4. #4
    Registered User
    Join Date
    08-26-2010
    Location
    Poplar Bluff MO
    MS-Off Ver
    Excel 2016
    Posts
    98

    Re: subtractct Lunch Time

    Thanks, I wasn't formatting it to General.

  5. #5
    Registered User
    Join Date
    08-26-2010
    Location
    Poplar Bluff MO
    MS-Off Ver
    Excel 2016
    Posts
    98

    Re: subtractct Lunch Time

    Now I have another issue that I didn't think about, when it crosses midnight this formula doesn't work.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: subtractct Lunch Time

    (C2+(1*(C2<B2))-B2)*24-D2

    1*(C2<B2) checks for midnight crossing
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    08-26-2010
    Location
    Poplar Bluff MO
    MS-Off Ver
    Excel 2016
    Posts
    98

    Re: subtractct Lunch Time

    Thanks Ben!

+ 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: 7
    Last Post: 04-25-2020, 03:23 AM
  2. [SOLVED] Calculating Time with 1/2 Hour Lunch Using Time Drop Down
    By TWP in forum Excel General
    Replies: 4
    Last Post: 12-17-2018, 03:53 PM
  3. Replies: 4
    Last Post: 02-14-2018, 03:52 PM
  4. Replies: 5
    Last Post: 07-29-2016, 03:15 AM
  5. [SOLVED] calculate time in and time out minus lunch hours
    By rjassal82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-29-2013, 10:43 AM
  6. [SOLVED] Needing to combine 2 IF statements in one Cell. Time Schedule minus lunch time
    By cody_o in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 04:10 PM
  7. Adding up Absent time taking lunch time into consideration
    By abrilabs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2013, 02:02 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