+ Reply to Thread
Results 1 to 6 of 6

IF Formula working with work shifts

Hybrid View

  1. #1
    Registered User
    Join Date
    12-16-2004
    Posts
    5

    Arrow IF Formula working with work shifts

    I am working on an hourly shift schedule and would like to do the following:

    I have it set up so that the time sheduled per shift is calculated.

    What I would like to do is have it deduct 30 minutes if a person works over 6 hours and 1 minute, or return the actual hours scheduled if the shirf is not over 6 hours and 1 minute.

    I can get it to deduct the 30 minutes, but it does it for every case :o(

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: IF Formula working with work shifts

    Without your workbook to look at it's unclear if you're doing match on Time Values or if you've already converted the time to standard decimals.

    A1 = Start Time
    B1 = End Time
    C1 = Time worked as a decimal (this formula calculates correct time even for shifts going past midnight)
    =(B1-A1+(A1>B1)) * 24

    D1 = break calculation
    =IF(C1>6, 0.5, 0)

    E1 =C1-D1
    If the hours worked have been calculated in
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-16-2004
    Posts
    5

    Arrow Re: IF Formula working with work shifts

    I have attached the form I am working on. I am a novice so it may not look like it should, but I can get most of it to work

    I would like the row under the daily hour calculation to give the modified amount if the time worked is over 6 hours and one minute.

    Thanks for the info.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: IF Formula working with work shifts

    Like so...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-16-2004
    Posts
    5

    Re: IF Formula working with work shifts

    Perfect! Thanks so much for your help!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: IF Formula working with work shifts

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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