+ Reply to Thread
Results 1 to 4 of 4

Check time is between 2 times and highlight cell

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    3

    Question Check time is between 2 times and highlight cell

    sample rota.xlsx

    I am trying to set up a rota based on 24hr shifts.

    When I type in a start time and end time I want the relevant time of day cell to be highlighted.

    I know the first part works on its own but the later time throws the formula out.

    Please help!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,667

    Re: Check time is between 2 times and highlight cell

    Hi Tetley09,

    Correction in C5 cell formula
    =IF(OR($A5="OFF",$B5="OFF"),0,MOD(B5-A5,1))

    Drag the C5 cell formula below to the C6 cell

    Try the below formula in your conditional formatting formula area
    =AND(D$3>=$A$6,D$4<=$B$6,D$4<>0)

    Refer the attachment file for details.

    Hope that helps!
    Attached Files Attached Files


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    10-01-2012
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Check time is between 2 times and highlight cell

    smaple rota2.xlsx

    Brilliant except it doesn't allow for 24hr

    There are some shifts that go into 02:00 and some are a night shift?

    I have attached the document.

  4. #4
    Registered User
    Join Date
    10-01-2012
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Check time is between 2 times and highlight cell

    Can anyone help with the 24hr problem on the conditional formatting?

    All I need is the conditional formating to work for after midnight.
    Last edited by Tetley09; 10-29-2012 at 07:20 AM.

+ 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