+ Reply to Thread
Results 1 to 5 of 5

traffic light status - Conditional formatting using dates.

  1. #1
    Registered User
    Join Date
    11-08-2007
    Posts
    2

    traffic light status - Conditional formatting using dates.

    Hi could someone please help.

    I need to be able to colour a cell called status red amber or green depending on the time taken from date due to date completed.

    To simplify the idea i have 4 cells in a row, A1 being the due date, B1 being the revised date, C1 being the completed date and D1 being the status cell (Green, Amber, Red, Green depending on status)

    So a Due date is input into cell A1 and D1 will be green to start.(Colour cell D4 green and text GREEN)

    If 7 days past the due date A1 will turn amber (Colour cell D1 yellow and text AMBER)

    If past 7 days of the due date A1 then D1 turns to status red (colour cell D1 red and text RED)

    If a revised date is input into cell B1 then D1 status should be reset to correspond to the conditions above again within 7 days or beyond.

    When a date or the word completed is input into cell C1 then D1 should change to colour green and text green.

    Can this be done with simple code using IF's and conditional formatting, any help appreciated.

    Thank you in advance.

    Stephen

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You can use the following in cell D1's conditional formatting:

    Condition 1:
    Formula Is: =C1<>""
    Pattern: Green

    Condition 2:
    Formula Is: =IF(B1<>"",TODAY()-B1>7,TODAY()-A1>7)
    Pattern: Red

    Condition 3:
    Formula Is: =IF(B1<>"",TODAY()-B1=7,TODAY()-A1=7)
    Pattern Amber

    HTH

    Jason

  3. #3
    Registered User
    Join Date
    11-08-2007
    Posts
    2

    Hi Jasoncw

    Thanks for your help,

    Is their a way to get the text to appear?

    Also it needs to be status green when no dates are input into Cells A1,B1,C1, and when its got todays date. Amber when its upto 7 days old and red when past 7 days old.

    Then green with the word closed, when C1 has something inputted into its cell.

    ANy ideas on that?

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    To which text are you referring?

  5. #5
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Quote Originally Posted by hebster
    Also it needs to be status green when no dates are input into Cells A1,B1,C1, and when its got todays date. Amber when its upto 7 days old and red when past 7 days old.

    Then green with the word closed, when C1 has something inputted into its cell.

    ANy ideas on that?
    Try these revised formulas:

    Condition 1:
    Formula Is: =OR(AND(A1="",B1="",C1=""),C1<>"")
    Pattern: Green

    Condition 2:
    Formula Is: =IF(B1<>"",TODAY()-B1>7,TODAY()-A1>7)
    Pattern: Red

    Condition 3:
    Formula Is: =IF(B1<>"",TODAY()-B1<=7,TODAY()-A1<=7)
    Pattern Amber

    HTH

    Jason

+ 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