+ Reply to Thread
Results 1 to 5 of 5

calculate shift duration

Hybrid View

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

    Re: Need help with IF

    for the sample provided:
    =IF(B1+(12*(A1>B1))-A1>6,B1+(12*(A1>B1))-A1-0.5,B1+(12*(A1>B1))-A1)
    where 12*(A1>B1) if the out time is less than the end time, then A1>B1 returns TRUE OR "1" else "0"
    Last edited by protonLeah; 04-29-2010 at 10:55 PM. Reason: dropped a bracket
    Ben Van Johnson

  2. #2
    Registered User
    Join Date
    04-28-2010
    Location
    Oklahoma
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Need help with IF

    [QUOTE=protonLeah;2297008]for the sample provided:
    CODE]=IF(B1+(12*(A1>B1))-A1>6,B1+(12*(A1>B1))-A1-0.5,B1+(12*(A1>B1))-A1)[/CODE]
    where 12*(A1>B1) if the out time is less than the end time, then A1>B1 returns TRUE OR "1" else "0"[/QUOTE


    This one worked great until there was a 12 hour shift I tried the >= but it did not work

+ 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