+ Reply to Thread
Results 1 to 3 of 3

Conditional formatting based on time

Hybrid View

sharkey Conditional formatting based... 12-23-2007, 07:10 AM
mikerickson This conditional formatting... 12-24-2007, 01:14 AM
sharkey Thank you 12-24-2007, 02:13 AM
  1. #1
    Registered User
    Join Date
    12-23-2007
    Posts
    2

    Conditional formatting based on time

    I'm using conditional formatting to highlight time based on user input. I want the colored bar to reflect time in 15 minute increments, unfortunatly I don't know how to make it work without being off one one side or the other. I doubt I've explained myself clearly and apologize.

    [IMG="http://www.excelforum.com/attachment.php?attachmentid=17293&stc=1&d=1198408694"]http://www.excelforum.com/attachment.php?attachmentid=17293&stc=1&d=1198408694[/IMG]
    Attached Images Attached Images
    Last edited by sharkey; 12-23-2007 at 07:21 AM. Reason: Add picture again

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    This conditional formatting formula worked for me.
    Select D2 and enter this as the formula. paste the format to the other cells.
    =AND($B$3<=($D$1+TIME(0,15*(COLUMNS($D$1:D1)-1),0)),($D$1+TIME(0,15*(COLUMNS($D$1:D1)-1),0))<$C$3)
    Last edited by mikerickson; 12-24-2007 at 01:16 AM.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    12-23-2007
    Posts
    2

    Thank you

    You're a genius.

    I changed the formula to

     =AND($B$2<=($D$2+TIME(0,15*(COLUMNS($D$2:D2)-1),0)),($D$2+TIME(0,15*(COLUMNS($D$2:D2)-1),0))<$C$2)
    and it works great

+ 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