+ Reply to Thread
Results 1 to 4 of 4

Fill cell based on time value

Hybrid View

  1. #1
    Registered User
    Join Date
    06-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Fill cell based on time value

    New to the forum and not very skilled in Excel. I need a bit of help with something that is probably very basic yet I can't figure it out.

    I download a report that shows a completion time of all "jobs" in date/time format ex: 6/25/2012 18:45. The jobs are completed 24/7 so I need to define if they were completed on Day shift (5:00 to 16:59) or Night shift (17:00 to 4:59) by adding a value of "A" for Day shift and "B" for Night shift in a new cell.

    Any help is greatly appreciated.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Fill cell based on time value

    Hi
    try this formula
    =IF(MOD(A1,1)<5/24,"B",IF(MOD(A1,1)>=17/24,"B","A"))

  3. #3
    Registered User
    Join Date
    06-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Fill cell based on time value

    That did it!

    Thank you!

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Fill cell based on time value

    Alternative

    =IF(OR(HOUR(A1)<5,HOUR(A1)>=17),"B","A")

    Please remember to mark your thread as SOLVED (instructions in rule #9 - click Forum Rules @ top of page to view).

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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