+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting Specific Time Window

  1. #1
    Forum Contributor
    Join Date
    04-29-2017
    Location
    Huntington Beach, California
    MS-Off Ver
    365 business
    Posts
    114

    Conditional Formatting Specific Time Window

    Hello Guys,
    I'm new to this and I would like to ask you for help.
    I have 2 times one is the target time (A) and one is the actual arriving time (B)
    I need to to change the color on arrival time if it's either 15 min earlier than the target time or if it's later than the arrival time. Only if it's in between this 15 min it should stay blank or green.
    It would be great if it's possible to show orange if it's 20-15 min before target time and 1-5min after the target time.
    Red if it's 20 or earlier before target time and 6min and longer after target time.

    I attached a workbook to get a better understanding.

    Thanks already.
    Martin
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional Formatting Specific Time Window

    Does the attached help
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    04-29-2017
    Location
    Huntington Beach, California
    MS-Off Ver
    365 business
    Posts
    114

    Re: Conditional Formatting Specific Time Window

    Hi Richard,
    Sorry for the late reply. Thanks for you help and it works great but the only thing I noticed is that it still shows green even though it's past Target time.
    It should only be green 15 min prior target time till exact target time. If it's one minute (1 to 5 min )late it should be orange and starting 6min and later it should turn red.
    Also is there any chance if there is a N in column A that we do not check whats before target time and only watch whats after target time. In other words if its before or exact target time it needs to be green,
    if it's past target time 1 min - 5 min orange and 6 min and up red.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Conditional Formatting Specific Time Window

    Here is an option, adapted from Richard's.
    Green rule formula (Note: Stop if true is checked):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Red rule formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Orange rule formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Columns E, F and G are not needed, they were used for testing and left for insight as to how the proposed solution works.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Contributor
    Join Date
    04-29-2017
    Location
    Huntington Beach, California
    MS-Off Ver
    365 business
    Posts
    114

    Re: Conditional Formatting Specific Time Window

    Thanks JeteMc. That's exactly what I needed. Thanks again for your help, Martin

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Conditional Formatting Specific Time Window

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. [SOLVED] Change VBA code for a specific window to any active window
    By dawondr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2016, 04:00 PM
  2. Replies: 6
    Last Post: 04-03-2015, 10:41 AM
  3. VBA to get rolling correlation for specific time window, 30 years daily data, 225 stocks
    By jasonleewkd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-15-2014, 06:43 AM
  4. Conditional formatting window: basic question
    By kyler in forum Excel General
    Replies: 7
    Last Post: 04-01-2012, 11:42 PM
  5. Conditional Formula for time window to include a buffer zone
    By sonny.thind in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-23-2011, 12:27 PM
  6. Replies: 4
    Last Post: 02-17-2011, 08:29 AM
  7. Conditional Formatting Based on Time Window
    By sdoremus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2008, 04:48 PM

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