+ Reply to Thread
Results 1 to 3 of 3

Timesheet formula to subtract 1/2 a hour lunch only if 6 hours are worked

  1. #1
    Registered User
    Join Date
    07-20-2020
    Location
    Seattle, WA
    MS-Off Ver
    2013 Excel
    Posts
    8

    Timesheet formula to subtract 1/2 a hour lunch only if 6 hours are worked

    Good Morning,

    I am trying to create a work schedule that will automatically subtract a 1/2 hour lunch provided the employee is scheduled to work more than 6 hours. I've attached (I hope) a workbook with an sample of my formula. (I'm using the second sheet to calculate the number of hours worked.)

    The below formula calculates the hours fine.

    =(Schedule!B3-Schedule!B2)*24

    When I use the below it subtracts the 0.5 even if 0 hours are scheduled and I'm not excel savvy enough to figure out what I'm doing wrong!

    =(Schedule!B3-Schedule!B2)*24+IF(6,-0.5)

    Thanks in advance for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Timesheet formula to subtract 1/2 a hour lunch only if 6 hours are worked

    Don't work with merged cells, you get in trouble with it sooner or later.

    I2 =IF(MOD(ROW(),2)>0,IF(((B2-B1)*24)>6,((B2-B1)*24)-0.5,(B2-B1)*24),"")

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    07-20-2020
    Location
    Seattle, WA
    MS-Off Ver
    2013 Excel
    Posts
    8

    Re: Timesheet formula to subtract 1/2 a hour lunch only if 6 hours are worked

    Thanks for the reply. I'll try it out tomorrow and let you know how it goes.

+ 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] Formula to calculate hours worked w/lunch or w/o + OT column only total after 40 hours
    By blinhart in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-31-2023, 11:14 AM
  2. Replies: 6
    Last Post: 07-05-2022, 01:06 PM
  3. Replies: 8
    Last Post: 09-30-2017, 07:00 PM
  4. Replies: 2
    Last Post: 01-17-2014, 02:22 PM
  5. [SOLVED] Adding Hours Worked minus lunch break IF over 5 hours
    By Gtrtim112 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-15-2013, 11:16 PM
  6. How can I get my formula to deduct lunch breaks based on hours worked?
    By nikijune in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-28-2013, 05:10 PM
  7. Excel timesheet formula to account for days worked > 5 and lunch
    By shanecline in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-13-2012, 04:09 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