+ Reply to Thread
Results 1 to 4 of 4

Hours worked formula

  1. #1
    Registered User
    Join Date
    09-17-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    2

    Hours worked formula

    I am calcuating the difference in time between hours worked. In addition, I am subtracting one hour, to relect a lunch hour. My current formula is
    =((MOD(J4-I4,1))*24-1

    The problem is when an individual does not work for the day, the current formula is showing hours worked as -1 and is throwing off the total hours for the week.

    Is there a conditional formula to include that would show a Zero if the referenced cells state "Off"?

    schedule.jpg

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Hours worked formula

    =if(j4="Off",0,((MOD(J4-I4,1))*24-1)

  3. #3
    Registered User
    Join Date
    09-17-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Hours worked formula

    That worked. THANK YOU!

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Hours worked formula

    No problem, glad I could help.

    If you feel the thread has answered your question, please choose Thread options at the top and mark the thread as solved so others can reference your query.

+ 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: 4
    Last Post: 02-12-2013, 07:01 AM
  2. Replies: 2
    Last Post: 02-11-2013, 02:26 PM
  3. Replies: 0
    Last Post: 05-14-2012, 05:36 PM
  4. Calculating basic hours worked, between a time range and premium hours worked
    By RoyLittle0 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-07-2012, 06:59 AM
  5. Replies: 0
    Last Post: 01-05-2012, 06:23 AM

Tags for this Thread

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