+ Reply to Thread
Results 1 to 3 of 3

IF/Then with Time

  1. #1
    Registered User
    Join Date
    07-14-2011
    Location
    Morganville
    MS-Off Ver
    Excel 2007
    Posts
    6

    IF/Then with Time

    I am looking to write a formula that states:

    If greater than 12:00 PM then Shift 1
    If 12:01PM-5PM than Shift 2
    If 5:01PM-11:59PM than Shift 3

    Thank you
    Last edited by SdavisCBN; 10-18-2011 at 02:10 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,758

    Re: IF/Then with Time

    ="Shift "&LOOKUP(A1,{0,0.5,0.708333},{1,2,3})

    Let me know if this is too cryptic for you. 0.5 means 12:00 noon and 0.708333 means 5:00 PM.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,758

    Re: IF/Then with Time

    BTW I'm pretty sure you meant


    If less than or equal to than 12:00 PM then Shift 1
    If 12:01PM-5PM than Shift 2
    If 5:01PM-11:59PM than Shift 3

+ 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