+ Reply to Thread
Results 1 to 9 of 9

Using condtional formatting for a time range

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    218

    Exclamation Using condtional formatting for a time range

    I have four cells, two are for the time range (start & end) when someone is available to work, the other two are scheduled times.

    What I want to happen is the text color changes to red when the scheduled time doesn't fit into the availability.

    This is what I have so far, but it doesn't work properly:
    Please Login or Register  to view this content.
    Help appreciated!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Using condtional formatting for a time range

    It would be much easier to offer suggestions if we could see a sample of what you are working with?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    07-17-2012
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    218

    Re: Using condtional formatting for a time range

    Here you go
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Using condtional formatting for a time range

    OK try this....
    for the start time...
    =AND(E5<>"",E5<E8)
    fir the end time...
    =AND(F5<>"",F5<F8)

  5. #5
    Forum Contributor
    Join Date
    07-17-2012
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    218

    Re: Using condtional formatting for a time range

    But what if the shift start time (E6) is 1am, and the availability is 11pm

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Using condtional formatting for a time range

    Then it will flag it as TRUE - it will highlight that this is a problem

  7. #7
    Forum Contributor
    Join Date
    07-17-2012
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    218

    Re: Using condtional formatting for a time range

    Any suggestions?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Using condtional formatting for a time range

    to what? If "shift start time (E6) is 1am, and the availability is 11pm" then it should flag the cell - and that is exactly what thte CF formula will do for you.

    What answer were you expecting?

  9. #9
    Forum Contributor
    Join Date
    07-17-2012
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    218

    Re: Using condtional formatting for a time range

    If the availability is 11pm-7am, and the actual shifts start time is 1 am, it returns true. I just need to figure out how to add an if statement into this properly to return false, on the condition that the availability end time is less than the availability start time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Condtional formatting
    By tinkerbelle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2013, 09:26 AM
  2. Condtional Formatting
    By univerco in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-11-2011, 05:43 PM
  3. Condtional Formatting
    By iamtehwalrus in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 04-19-2010, 11:25 PM
  4. Condtional formatting
    By gandolff in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2009, 08:58 PM
  5. condtional formatting help
    By diesel20056 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-17-2006, 11:16 AM

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